Subject:
|
Re: New colours in Ldraw?
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Thu, 7 Oct 2004 19:28:41 GMT
|
Viewed:
|
1429 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
In lugnet.cad, Travis Cobbs wrote:
> So, just so that I understand, are you saying that ldraw subtracts 64 from
> colors between 64 and 128, and uses that new value as the color? I wasn't
> aware of this behavior. (I understand it might not do exactly that; I just
> want to know if that is the effective result.)
Yes, basically. LDraw color codes are bit-mapped.
Bit 8 -> 0=normal, 1=dithered
Bit 5 -> 0=opaque, 1=transparent (when bit 8 is 0)
Bit 0-3 -> Color index (when bit 8 is 0)
When LDraw goes to draw an opaque color, it does (color && 0xF) to mask off the
higher bits.
The effect of this is that color codes 0 to 255 all map to one of the 16 core
colors (except for codes 16 and 24, which are handled specially). Codes repeat
in blocks of 16. Half of the codes are opaque, and half are transparent.
For example, LDraw treats codes 1, 17, 65, 81, 129, 145, 193, and 209 as blue.
Codes 33, 49, 97, 113, 161, 177, 225, and 241 are trans-blue.
Unfortunately, the extended color codes we've assigned (from 17 to 30) weren't
picked with this behavior in mind, so they don't degrade gracefully in LDraw.
Steve
|
|
Message is in Reply To:
![](/news/x.gif) | | Re: New colours in Ldraw?
|
| (...) So, just so that I understand, are you saying that ldraw subtracts 64 from colors between 64 and 128, and uses that new value as the color? I wasn't aware of this behavior. (I understand it might not do exactly that; I just want to know if (...) (20 years ago, 7-Oct-04, to lugnet.cad)
|
20 Messages in This Thread: ![New colours in Ldraw? -Ross Crawford (7-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: New colours in Ldraw? -Orion Pobursky (7-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![RE: New colours in Ldraw? -William Howard (7-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: New colours in Ldraw? -Steve Bliss (7-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: New colours in Ldraw? -Travis Cobbs (7-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: New colours in Ldraw? -Steve Bliss (7-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: New colours in Ldraw? -Travis Cobbs (7-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![You are here](/news/here.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New colours in Ldraw? -William Howard (8-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: New colours in Ldraw? -Steve Bliss (8-Oct-04 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/268.gif) ![Re: New colours in Ldraw? -Koyan Töreni (8-Oct-04 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/268.gif) ![Re: New colours in Ldraw? -Bernd Broich (9-Oct-04 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New colours in Ldraw? -Travis Cobbs (9-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![RE: New colours in Ldraw? -William Howard (10-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: New colours in Ldraw? -Chris Dee (10-Oct-04 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New colours in Ldraw? -Steve Bliss (7-Oct-04 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/68.gif) ![Re: New colours in Ldraw? -David Laswell (7-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: New colours in Ldraw? -Steve Bliss (14-Oct-04 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: New colours in Ldraw? -David Laswell (14-Oct-04 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: New colours in Ldraw? -Clark Stephens (14-Oct-04 to lugnet.cad)](/news/x.gif)
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|