Message Boards Message Boards

0
|
2180 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

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

Posted 3 years ago

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 BY: Richard Frost
Posted 3 years ago
List @@@ {RGBColor["AliceBlue"], RGBColor["DarkMagenta"]}
POSTED BY: Hans Milton
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