To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 2042
2041  |  2043
Subject: 
Re: How to dither colors
Newsgroups: 
lugnet.cad
Date: 
Thu, 24 Jun 1999 14:31:46 GMT
Viewed: 
611 times
  
Thanks.  I knew that was in there but couldn't find it.  This section should
be moved to (or at least referenced in) the section on Color Codes.

-John Van

Lars C. Hassing <lch@ccieurope.com> wrote in message
news:57F1FE754246D211A98700805FB7914501BCDE50@aarhus...
John VanZwieten asked:
What's the formula for calculating a dithered color?

color 1 * ??? + color 2.  What value is ???

The Ldraw FAQ (http://www.ldraw.org/FAQ/) says:
Colours
Colours are outlined in LEDIT.DOC. Two special values are 16 and 24.
16 is the 'current colour', i.e., whatever colour was specified on
the type 1 line which caused the current line to be executed.
Colour 24 is a complementary colour to the current colour, usually
the bright/dark complementary shade. So if the current colour is
dark blue, colour 24 would give bright blue.

Also, colours 256 through 511 are dithered. So if you want to
combine colours J and K, figure your colour value as

colour = (J * 16) + K + 256

The complementary colour of J is used as the complementary colour
of the dithered value. So you can control the edge colour
(somewhat) by switching J and K.

<end-quote>

LDraw uses dithering because it only had 16 colors available in
a VGA display. On modern computers having 65536 or 16 million
colors, a renderer could choose to blend the rgb color values
(like L3P does): rgb = (rgb(J)+rgb(K)) / 2
/Lars




Message is in Reply To:
  RE: How to dither colors
 
John VanZwieten asked: (...) The Ldraw FAQ ((URL) says: Colours Colours are outlined in LEDIT.DOC. Two special values are 16 and 24. 16 is the 'current colour', i.e., whatever colour was specified on the type 1 line which caused the current line to (...) (25 years ago, 24-Jun-99, to lugnet.cad)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR