Message Boards Message Boards

GROUPS:

[Solved]Built-in function to obtain color coordinates from color directive?

Posted 9 months ago
883 Views
|
1 Reply
|
2 Total Likes
|

Is there a Built-in function to obtain color coordinates from a color directive? I'm currently doing it the hard way:

colors = {RGBColor["AliceBlue"], RGBColor["DarkMagenta"]};
colorcoords = 
 ToExpression[
    StringSplit[
     StringSplit[StringSplit[ToString[InputForm[#]], "["][[2]], 
       "]"][[1]], ","]] & /@ colors
...
{{0.941176, 0.972549, 1.}, {0.545098, 0., 0.545098}}
Posted 9 months ago
List @@@ {RGBColor["AliceBlue"], RGBColor["DarkMagenta"]}
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract