POV-Ray : Newsgroups : povray.binaries.scene-files : ACI to RGB convertion, modyfied CHSL2RGB Server Time
1 Sep 2024 22:19:28 EDT (-0400)
  ACI to RGB convertion, modyfied CHSL2RGB (Message 1 to 2 of 2)  
From: Przemek Loesch
Subject: ACI to RGB convertion, modyfied CHSL2RGB
Date: 3 Jul 2003 16:23:39
Message: <3f0490cb$1@news.povray.org>
Hi to everyone! This is my first post here.
ACI - Autocad Color Index is mainly used for specyfing colors of entities in
DXF files. This scene was made to test the method of reading ACI colors I am
preparing for my cad-like program.
By the way I discovered a strange behaviour of CHSL2RGB macro from
"Colors.inc". It seems this macro does the conversion in an other way than
most of a graphics software do. When calling CHSL2RGB(0,1,1) one receives
rgb<1,1,1> instead of rgb<1,0,0>. This macro adds some white to rgb vector
(based on value of L) when it should rather work like increasing values of
two color components to the level of the component which has the highest
value, but no higher then this value. Anyway this is a matter of convention
and I'm not telling this macro is wrong. Just if you want to convert colors
from HSL to RGB like Photoshop do you can use my version.
Greetings!


Post a reply to this message


Attachments:
Download 'ACI_to_RGB.pov.txt' (4 KB)

From: Wuhan
Subject: Re: ACI to RGB convertion, modyfied CHSL2RGB
Date: 7 Dec 2006 01:20:00
Message: <web.4577b175ceec76565942075b0@news.povray.org>
"Przemek Loesch" <loe### [at] rtknetpl> wrote:
> Hi to everyone! This is my first post here.
> ACI - Autocad Color Index is mainly used for specyfing colors of entities in
> DXF files. This scene was made to test the method of reading ACI colors I am
> preparing for my cad-like program.
> By the way I discovered a strange behaviour of CHSL2RGB macro from
> "Colors.inc". It seems this macro does the conversion in an other way than
> most of a graphics software do. When calling CHSL2RGB(0,1,1) one receives
> rgb<1,1,1> instead of rgb<1,0,0>. This macro adds some white to rgb vector
> (based on value of L) when it should rather work like increasing values of
> two color components to the level of the component which has the highest
> value, but no higher then this value. Anyway this is a matter of convention
> and I'm not telling this macro is wrong. Just if you want to convert colors
> from HSL to RGB like Photoshop do you can use my version.
> Greetings!


Hi, I would like to know how to convert from RGB color to ACI color index in
autocad. Thank.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.