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

**URL:** <https://community.wolfram.com/t/solved-built-in-function-to-obtain-color-coordinates-from-color-directive/17740>\
**Category:** Questions\
**Tags:** graphics-and-visualization\
**Created:** [March 5, 2021, 9:27am UTC](https://community.wolfram.com/t/solved-built-in-function-to-obtain-color-coordinates-from-color-directive/17740 "2021-03-05T09:27:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tangentvectors](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/tangentvectors/32/9065_2.png) [@tangentvectors](https://community.wolfram.com/u/tangentvectors)\
**Post date:** [March 5, 2021, 9:27am UTC](https://community.wolfram.com/t/solved-built-in-function-to-obtain-color-coordinates-from-color-directive/17740/1 "2021-03-05T09:27:45Z")

</div>

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}}

```

---

<div class="post-metadata">

**Author:** ![hansmilton](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/hansmilton/32/8656_2.png) [@hansmilton](https://community.wolfram.com/u/hansmilton)\
**Post date:** [March 5, 2021, 10:04am UTC](https://community.wolfram.com/t/solved-built-in-function-to-obtain-color-coordinates-from-color-directive/17740/2 "2021-03-05T10:04:09Z")

</div>

List @@@ {RGBColor[“AliceBlue”], RGBColor[“DarkMagenta”]}
