<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Converting colors in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957097#M78148</link>
    <description>How do I convert an AutoCad color to a system.drawing.color if the AutoCad. color is by Index&lt;BR /&gt;
&lt;BR /&gt;
switch (autoCadLayer.Color.ColorMethod)&lt;BR /&gt;
{&lt;BR /&gt;
case Autodesk.AutoCAD.Colors.ColorMethod.ByColor:&lt;BR /&gt;
	System.Drawing.Color  color = autoCadLayer.Color.ColorValue;&lt;BR /&gt;
		break;&lt;BR /&gt;
&lt;BR /&gt;
case Autodesk.AutoCAD.Colors.ColorMethod.ByAci:&lt;BR /&gt;
System.Drawing.Color  color = System.Drawing.Color.FromArgb(?, ?, ?);&lt;BR /&gt;
		break;&lt;BR /&gt;
}</description>
    <pubDate>Wed, 02 May 2007 08:34:28 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-05-02T08:34:28Z</dc:date>
    <item>
      <title>Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957097#M78148</link>
      <description>How do I convert an AutoCad color to a system.drawing.color if the AutoCad. color is by Index&lt;BR /&gt;
&lt;BR /&gt;
switch (autoCadLayer.Color.ColorMethod)&lt;BR /&gt;
{&lt;BR /&gt;
case Autodesk.AutoCAD.Colors.ColorMethod.ByColor:&lt;BR /&gt;
	System.Drawing.Color  color = autoCadLayer.Color.ColorValue;&lt;BR /&gt;
		break;&lt;BR /&gt;
&lt;BR /&gt;
case Autodesk.AutoCAD.Colors.ColorMethod.ByAci:&lt;BR /&gt;
System.Drawing.Color  color = System.Drawing.Color.FromArgb(?, ?, ?);&lt;BR /&gt;
		break;&lt;BR /&gt;
}</description>
      <pubDate>Wed, 02 May 2007 08:34:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957097#M78148</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-02T08:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957098#M78149</link>
      <description>Perhaps try something like :&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
PromptSelectionOptions selectionOptions = new PromptSelectionOptions();&lt;BR /&gt;
PromptEntityResult entityRes = ed.GetEntity("\nPick something");&lt;BR /&gt;
&lt;BR /&gt;
//Do nothing if selection is unsuccessful&lt;BR /&gt;
if (entityRes.Status != PromptStatus.OK)&lt;BR /&gt;
    return;&lt;BR /&gt;
//&lt;BR /&gt;
Entity ent = (Entity)tr.GetObject(entityRes.ObjectId, OpenMode.ForWrite);&lt;BR /&gt;
//&lt;BR /&gt;
if (ent.Color.IsByAci == false)&lt;BR /&gt;
    return;&lt;BR /&gt;
//&lt;BR /&gt;
System.Drawing.Color winColor = System.Drawing.Color.FromArgb(&lt;BR /&gt;
    ent.Color.ColorValue.A,&lt;BR /&gt;
    ent.Color.ColorValue.R,&lt;BR /&gt;
    ent.Color.ColorValue.G,&lt;BR /&gt;
    ent.Color.ColorValue.B&lt;BR /&gt;
    );&lt;BR /&gt;
ed.WriteMessage("\n "&lt;BR /&gt;
    + winColor.Name.ToString()&lt;BR /&gt;
    + "  .... "&lt;BR /&gt;
    + winColor.ToString()&lt;BR /&gt;
    );&lt;BR /&gt;
//&lt;BR /&gt;
&lt;BR /&gt;
/// kwb&lt;BR /&gt;
&lt;THISS&gt; wrote in message news:5571705@discussion.autodesk.com...&lt;BR /&gt;
How do I convert an AutoCad color to a system.drawing.color if the AutoCad. &lt;BR /&gt;
color is by Index&lt;BR /&gt;
&lt;BR /&gt;
switch (autoCadLayer.Color.ColorMethod)&lt;BR /&gt;
{&lt;BR /&gt;
case Autodesk.AutoCAD.Colors.ColorMethod.ByColor:&lt;BR /&gt;
System.Drawing.Color  color = autoCadLayer.Color.ColorValue;&lt;BR /&gt;
break;&lt;BR /&gt;
&lt;BR /&gt;
case Autodesk.AutoCAD.Colors.ColorMethod.ByAci:&lt;BR /&gt;
System.Drawing.Color  color = System.Drawing.Color.FromArgb(?, ?, ?);&lt;BR /&gt;
break;&lt;BR /&gt;
}&lt;/THISS&gt;</description>
      <pubDate>Thu, 03 May 2007 12:15:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957098#M78149</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-03T12:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957099#M78150</link>
      <description>Kerry&lt;BR /&gt;
&lt;BR /&gt;
I  tried this before I posted the question.&lt;BR /&gt;
&lt;BR /&gt;
The problem is that if the color mode is by index then the ARGB slots do not contain Red Green &amp;amp; Blue values. The A slot appears to be 255 and the R slot holds the index number and G &amp;amp; B are zero&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dave</description>
      <pubDate>Thu, 03 May 2007 13:36:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957099#M78150</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-03T13:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957100#M78151</link>
      <description>Dave,&lt;BR /&gt;
I'd have to see your code, but ..&lt;BR /&gt;
It looks like you're working with a LayerTableRecord&lt;BR /&gt;
so, by my understanding,&lt;BR /&gt;
so you should be able to do what you need from the ltr.Color.ColorValue.R &lt;BR /&gt;
... etc, fed to the&lt;BR /&gt;
System.Drawing.Color.FromArgb( A, R,G, B) as I've shown.&lt;BR /&gt;
&lt;BR /&gt;
/// kwb&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;THISS&gt; wrote in message news:5573590@discussion.autodesk.com...&lt;BR /&gt;
Kerry&lt;BR /&gt;
&lt;BR /&gt;
I  tried this before I posted the question.&lt;BR /&gt;
&lt;BR /&gt;
The problem is that if the color mode is by index then the ARGB slots do not &lt;BR /&gt;
contain Red Green &amp;amp; Blue values. The A slot appears to be 255 and the R slot &lt;BR /&gt;
holds the index number and G &amp;amp; B are zero&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dave&lt;/THISS&gt;</description>
      <pubDate>Fri, 04 May 2007 03:13:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957100#M78151</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T03:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957101#M78152</link>
      <description>Kerry&lt;BR /&gt;
&lt;BR /&gt;
Tks for reply. Here is the code. Its a common call when reading the layer table and the entities.&lt;BR /&gt;
&lt;BR /&gt;
If I have a layer with a colour that is ByAci then in the ColorValue object I have the following&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
	ColorValue = "{Name=ff050000, ARGB=(255, 5, 0, 0)}"&lt;BR /&gt;
&lt;BR /&gt;
Five being the Acad index for Blue&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If however I have a layer where the colour is ByValue I get the following, which is good&lt;BR /&gt;
&lt;BR /&gt;
	ColorValue = "{Name=ff2109f6, ARGB=(255, 33, 9, 246)}"&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
When I read the entities I use the same method&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If the color is by layer I don't need to look at the entities color (it is empty anyway)&lt;BR /&gt;
&lt;BR /&gt;
	ColorValue = "{Name=ff000000, ARGB=(255, 0, 0, 0)}"&lt;BR /&gt;
&lt;BR /&gt;
but if the color is not by layer I get exactky the same behaviour as above&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Code snippet below.....&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
NB I'm on leave next week, so if you reply I am not ignoring you !&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Many thanks&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dave</description>
      <pubDate>Fri, 04 May 2007 07:35:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957101#M78152</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T07:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957102#M78153</link>
      <description>Or just use EntityColor.LookUpRgb()&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2008&lt;BR /&gt;
Supporting AutoCAD 2000 through 2008&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
"Kerry Brown" &lt;KWB&gt; wrote in message news:5574757@discussion.autodesk.com...&lt;BR /&gt;
Dave,&lt;BR /&gt;
I'd have to see your code, but ..&lt;BR /&gt;
It looks like you're working with a LayerTableRecord&lt;BR /&gt;
so, by my understanding,&lt;BR /&gt;
so you should be able to do what you need from the ltr.Color.ColorValue.R &lt;BR /&gt;
... etc, fed to the&lt;BR /&gt;
System.Drawing.Color.FromArgb( A, R,G, B) as I've shown.&lt;BR /&gt;
&lt;BR /&gt;
/// kwb&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;THISS&gt; wrote in message news:5573590@discussion.autodesk.com...&lt;BR /&gt;
Kerry&lt;BR /&gt;
&lt;BR /&gt;
I  tried this before I posted the question.&lt;BR /&gt;
&lt;BR /&gt;
The problem is that if the color mode is by index then the ARGB slots do not &lt;BR /&gt;
contain Red Green &amp;amp; Blue values. The A slot appears to be 255 and the R slot &lt;BR /&gt;
holds the index number and G &amp;amp; B are zero&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dave&lt;/THISS&gt;&lt;/KWB&gt;</description>
      <pubDate>Fri, 04 May 2007 09:31:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957102#M78153</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T09:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957103#M78154</link>
      <description>Tony&lt;BR /&gt;
&lt;BR /&gt;
Tks for joining in&lt;BR /&gt;
&lt;BR /&gt;
What do you mean by EntityColor.LookUpRgb() ?&lt;BR /&gt;
&lt;BR /&gt;
There is no LookUpRgb method or property on the AutoCAD.Colors.Color object.&lt;BR /&gt;
&lt;BR /&gt;
Can you be more specific please ?&lt;BR /&gt;
&lt;BR /&gt;
Dave</description>
      <pubDate>Fri, 04 May 2007 12:11:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957103#M78154</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T12:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957104#M78155</link>
      <description>Tony&lt;BR /&gt;
&lt;BR /&gt;
Sorry - mis understood - I see there is a static method - just tryimng it now&lt;BR /&gt;
&lt;BR /&gt;
tks&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
dave</description>
      <pubDate>Fri, 04 May 2007 12:16:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957104#M78155</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T12:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957105#M78156</link>
      <description>Tony&lt;BR /&gt;
&lt;BR /&gt;
Okay - I now have this&lt;BR /&gt;
int i = Autodesk.AutoCAD.Colors.EntityColor.LookUpRgb(acadColor.ColorValue.R);&lt;BR /&gt;
&lt;BR /&gt;
Which returns an integer. How do I get that into RGB  (in .NET)?&lt;BR /&gt;
&lt;BR /&gt;
Tks&lt;BR /&gt;
&lt;BR /&gt;
Dave</description>
      <pubDate>Fri, 04 May 2007 12:22:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957105#M78156</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T12:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957106#M78157</link>
      <description>For your LTR, just for the fun of it, how about :-&lt;BR /&gt;
&lt;BR /&gt;
System.Drawing.Color argb = System.Drawing.Color.FromArgb(&lt;BR /&gt;
    AcColors.EntityColor.LookUpRgb(&lt;BR /&gt;
    System.Convert.ToByte(&lt;BR /&gt;
    ltr.Color.ColorIndex)));&lt;BR /&gt;
&lt;BR /&gt;
/// kwb&lt;BR /&gt;
&lt;BR /&gt;
&lt;THISS&gt; wrote in message news:5575062@discussion.autodesk.com...&lt;BR /&gt;
Tony&lt;BR /&gt;
&lt;BR /&gt;
Okay - I now have this&lt;BR /&gt;
int i = &lt;BR /&gt;
Autodesk.AutoCAD.Colors.EntityColor.LookUpRgb(acadColor.ColorValue.R);&lt;BR /&gt;
&lt;BR /&gt;
Which returns an integer. How do I get that into RGB  (in .NET)?&lt;BR /&gt;
&lt;BR /&gt;
Tks&lt;BR /&gt;
&lt;BR /&gt;
Dave&lt;/THISS&gt;</description>
      <pubDate>Fri, 04 May 2007 12:56:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957106#M78157</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T12:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957107#M78158</link>
      <description>Kerry - What's 'AcColors' ?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2008&lt;BR /&gt;
Supporting AutoCAD 2000 through 2008&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
"Kerry Brown" &lt;KWB&gt; wrote in message news:5575042@discussion.autodesk.com...&lt;BR /&gt;
For your LTR, just for the fun of it, how about :-&lt;BR /&gt;
&lt;BR /&gt;
System.Drawing.Color argb = System.Drawing.Color.FromArgb(&lt;BR /&gt;
    AcColors.EntityColor.LookUpRgb(&lt;BR /&gt;
    System.Convert.ToByte(&lt;BR /&gt;
    ltr.Color.ColorIndex)));&lt;BR /&gt;
&lt;BR /&gt;
/// kwb&lt;BR /&gt;
&lt;BR /&gt;
&lt;THISS&gt; wrote in message news:5575062@discussion.autodesk.com...&lt;BR /&gt;
Tony&lt;BR /&gt;
&lt;BR /&gt;
Okay - I now have this&lt;BR /&gt;
int i = &lt;BR /&gt;
Autodesk.AutoCAD.Colors.EntityColor.LookUpRgb(acadColor.ColorValue.R);&lt;BR /&gt;
&lt;BR /&gt;
Which returns an integer. How do I get that into RGB  (in .NET)?&lt;BR /&gt;
&lt;BR /&gt;
Tks&lt;BR /&gt;
&lt;BR /&gt;
Dave&lt;/THISS&gt;&lt;/KWB&gt;</description>
      <pubDate>Fri, 04 May 2007 13:05:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957107#M78158</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T13:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957108#M78159</link>
      <description>Reading up on the Color class (the .NET one,&lt;BR /&gt;
not the Autodesk one) should reveal how to&lt;BR /&gt;
do it.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2008&lt;BR /&gt;
Supporting AutoCAD 2000 through 2008&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;THISS&gt; wrote in message news:5575062@discussion.autodesk.com...&lt;BR /&gt;
Tony&lt;BR /&gt;
&lt;BR /&gt;
Okay - I now have this&lt;BR /&gt;
int i = Autodesk.AutoCAD.Colors.EntityColor.LookUpRgb(acadColor.ColorValue.R);&lt;BR /&gt;
&lt;BR /&gt;
Which returns an integer. How do I get that into RGB  (in .NET)?&lt;BR /&gt;
&lt;BR /&gt;
Tks&lt;BR /&gt;
&lt;BR /&gt;
Dave&lt;/THISS&gt;</description>
      <pubDate>Fri, 04 May 2007 13:05:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957108#M78159</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T13:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957109#M78160</link>
      <description>On second thought, I think this is all he needs:&lt;BR /&gt;
&lt;BR /&gt;
  Autodesk.AutoCAD.Colors.Color entColor = //&lt;BR /&gt;
&lt;BR /&gt;
  System.Drawing.Color color = entColor.ColorValue;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2008&lt;BR /&gt;
Supporting AutoCAD 2000 through 2008&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
"Kerry Brown" &lt;KWB&gt; wrote in message news:5575042@discussion.autodesk.com...&lt;BR /&gt;
For your LTR, just for the fun of it, how about :-&lt;BR /&gt;
&lt;BR /&gt;
System.Drawing.Color argb = System.Drawing.Color.FromArgb(&lt;BR /&gt;
    AcColors.EntityColor.LookUpRgb(&lt;BR /&gt;
    System.Convert.ToByte(&lt;BR /&gt;
    ltr.Color.ColorIndex)));&lt;BR /&gt;
&lt;BR /&gt;
/// kwb&lt;BR /&gt;
&lt;BR /&gt;
&lt;THISS&gt; wrote in message news:5575062@discussion.autodesk.com...&lt;BR /&gt;
Tony&lt;BR /&gt;
&lt;BR /&gt;
Okay - I now have this&lt;BR /&gt;
int i = &lt;BR /&gt;
Autodesk.AutoCAD.Colors.EntityColor.LookUpRgb(acadColor.ColorValue.R);&lt;BR /&gt;
&lt;BR /&gt;
Which returns an integer. How do I get that into RGB  (in .NET)?&lt;BR /&gt;
&lt;BR /&gt;
Tks&lt;BR /&gt;
&lt;BR /&gt;
Dave&lt;/THISS&gt;&lt;/KWB&gt;</description>
      <pubDate>Fri, 04 May 2007 13:21:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957109#M78160</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T13:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957110#M78161</link>
      <description>Tony,&lt;BR /&gt;
&lt;BR /&gt;
Just a lame alias &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
using AcColors = Autodesk.AutoCAD.Colors;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Tony Tanzillo" &lt;TONY.TANZILLO&gt; wrote in message &lt;BR /&gt;
news:5575110@discussion.autodesk.com...&lt;BR /&gt;
Kerry - What's 'AcColors' ?&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2008&lt;BR /&gt;
Supporting AutoCAD 2000 through 2008&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
"Kerry Brown" &lt;KWB&gt; wrote in message &lt;BR /&gt;
news:5575042@discussion.autodesk.com...&lt;BR /&gt;
For your LTR, just for the fun of it, how about :-&lt;BR /&gt;
&lt;BR /&gt;
System.Drawing.Color argb = System.Drawing.Color.FromArgb(&lt;BR /&gt;
    AcColors.EntityColor.LookUpRgb(&lt;BR /&gt;
    System.Convert.ToByte(&lt;BR /&gt;
    ltr.Color.ColorIndex)));&lt;BR /&gt;
&lt;BR /&gt;
/// kwb&lt;BR /&gt;
&lt;BR /&gt;
&lt;THISS&gt; wrote in message news:5575062@discussion.autodesk.com...&lt;BR /&gt;
Tony&lt;BR /&gt;
&lt;BR /&gt;
Okay - I now have this&lt;BR /&gt;
int i =&lt;BR /&gt;
Autodesk.AutoCAD.Colors.EntityColor.LookUpRgb(acadColor.ColorValue.R);&lt;BR /&gt;
&lt;BR /&gt;
Which returns an integer. How do I get that into RGB  (in .NET)?&lt;BR /&gt;
&lt;BR /&gt;
Tks&lt;BR /&gt;
&lt;BR /&gt;
Dave&lt;/THISS&gt;&lt;/KWB&gt;&lt;/TONY.TANZILLO&gt;</description>
      <pubDate>Fri, 04 May 2007 13:28:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957110#M78161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T13:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957111#M78162</link>
      <description>&lt;DIV id="jive-html-wrapper-div"&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;Yep, Works for me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;BR /&gt;
&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;ltr = (LayerTableRecord)tm.GetObject(ltrId, &lt;BR /&gt;
OpenMode.ForRead);&lt;/FONT&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;System.Drawing.Color winColor = &lt;BR /&gt;
ltr.Color.ColorValue;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;/// kwb&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;
&lt;DIV&gt;&lt;FONT face="Arial" size="2"&gt;"Tony Tanzillo" &amp;lt;&lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
href="mailto:tony.tanzillo@THE_URL_BELOW.com"&amp;gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;tony.tanzillo@THE_URL_BELOW.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Arial" size="2"&gt;&amp;gt; &lt;BR /&gt;
wrote in message &lt;/FONT&gt;&lt;A href="news:5575117@discussion.autodesk.com"&gt;&lt;FONT&gt;&lt;BR /&gt;
face=Arial size=2&amp;gt;news:5575117@discussion.autodesk.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT&gt;&lt;BR /&gt;
face=Arial size=2&amp;gt;...&lt;/FONT&gt;&lt;/DIV&gt;&lt;FONT face="Arial" size="2"&gt;On second thought, I &lt;BR /&gt;
think this is all he needs:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; Autodesk.AutoCAD.Colors.Color entColor &lt;BR /&gt;
= //&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; System.Drawing.Color color = &lt;BR /&gt;
entColor.ColorValue;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-- &lt;BR /&gt;&lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
href="http://www.caddzone.com"&amp;gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;http://www.caddzone.com&lt;/FONT&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;AcadXTabs: MDI Document Tabs for AutoCAD 2008&lt;BR /&gt;Supporting AutoCAD 2000 &lt;BR /&gt;
through 2008&lt;BR /&gt;&lt;/FONT&gt;&lt;A href="http://www.acadxtabs.com"&gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;http://www.acadxtabs.com&lt;/FONT&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Arial" size="2"&gt;"Kerry &lt;BR /&gt;
Brown" &amp;lt;&lt;/FONT&gt;&lt;A href="mailto:kwb@home"&gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;kwb@home&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Arial" size="2"&gt;&amp;gt; wrote in message &lt;BR /&gt;
&lt;/FONT&gt;&lt;A href="news:5575042@discussion.autodesk.com"&gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;news:5575042@discussion.autodesk.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;...&lt;BR /&gt;For your LTR, just for the fun of it, how about &lt;BR /&gt;
:-&lt;BR /&gt;&lt;BR /&gt;System.Drawing.Color argb = &lt;BR /&gt;
System.Drawing.Color.FromArgb(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
AcColors.EntityColor.LookUpRgb(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;
System.Convert.ToByte(&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ltr.Color.ColorIndex)));&lt;BR /&gt;&lt;BR /&gt;/// &lt;BR /&gt;
kwb&lt;BR /&gt;&lt;BR /&gt;&amp;lt;Thiss&amp;gt; wrote in message &lt;/FONT&gt;&lt;A&gt;&lt;BR /&gt;
href="news:5575062@discussion.autodesk.com"&amp;gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;news:5575062@discussion.autodesk.com&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Arial"&gt;&lt;BR /&gt;
size=2&amp;gt;...&lt;BR /&gt;Tony&lt;BR /&gt;&lt;BR /&gt;Okay - I now have this&lt;BR /&gt;int i = &lt;BR /&gt;
&lt;BR /&gt;Autodesk.AutoCAD.Colors.EntityColor.LookUpRgb(acadColor.ColorValue.R);&lt;BR /&gt;&lt;BR /&gt;Which &lt;BR /&gt;
returns an integer. How do I get that into RGB&amp;nbsp; (in &lt;BR /&gt;
.NET)?&lt;BR /&gt;&lt;BR /&gt;Tks&lt;BR /&gt;&lt;BR /&gt;Dave&lt;/FONT&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 04 May 2007 13:36:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957111#M78162</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T13:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Converting colors</title>
      <link>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957112#M78163</link>
      <description>Guys&lt;BR /&gt;
&lt;BR /&gt;
All sorted tks - didn;t spot I could just pass the integer returned by the LookUpRgb into the Syste.Color.FromArgb method&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Tks for help&lt;BR /&gt;
&lt;BR /&gt;
Dave</description>
      <pubDate>Fri, 04 May 2007 14:14:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/converting-colors/m-p/1957112#M78163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-05-04T14:14:25Z</dc:date>
    </item>
  </channel>
</rss>

