Skip to main content
Solved

passing color rgb to pdfstyler

  • November 26, 2019
  • 8 replies
  • 80 views

tnarladni
Enthusiast
Forum|alt.badge.img+23

I am creating a legend for my pdf and using the PDFStyler to create the different line colors. Based on a certain value in an attribute, I am setting the rgb for the legend line. It looks ok in inspector after the PDFStyler, but when it goes through the PDFPageFormatter, all the lines are blue. If I were to set the color for the data individually, it is fine, it is just when I attempt to set the color from an attribute that it doesn't work. Would appreciate any help.

some of the types are not defined which is why they are black.all blue

 

Best answer by ebygomm

If you already have the colours as RGB values, you can convert. There are custom transformers on the hub that will do this conversion for you, e.g. ColorCalculator

If you want to pick colours, this site will give you fme colours

https://www.tydac.ch/color/

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

8 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • November 26, 2019

I think the attributes need to be structured as FME colours not RGB if you are using the attributes to set the colour in the pdf styler, despite it displaying an RGB colour if you use the colour picker.


tnarladni
Enthusiast
Forum|alt.badge.img+23
  • Author
  • Enthusiast
  • 88 replies
  • November 26, 2019

I think the attributes need to be structured as FME colours not RGB if you are using the attributes to set the colour in the pdf styler, despite it displaying an RGB colour if you use the colour picker.

@ebygomm what's an fme color? how do I set that?


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • November 26, 2019

@ebygomm what's an fme color? how do I set that?

So the RGB colour for red is 255,0,0

FME colour for red is 1,0,0

White is 1,1,1

Black is 0,0,0

etc.


tnarladni
Enthusiast
Forum|alt.badge.img+23
  • Author
  • Enthusiast
  • 88 replies
  • November 26, 2019

I think the attributes need to be structured as FME colours not RGB if you are using the attributes to set the colour in the pdf styler, despite it displaying an RGB colour if you use the colour picker.

do you have a link to a help? I need more than the basic colors...like cyan and magenta. thanks!


tnarladni
Enthusiast
Forum|alt.badge.img+23
  • Author
  • Enthusiast
  • 88 replies
  • November 26, 2019

So the RGB colour for red is 255,0,0

FME colour for red is 1,0,0

White is 1,1,1

Black is 0,0,0

etc.

do you have a link to a help? I need more than the basic colors...like cyan and magenta. thanks!


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • Best Answer
  • November 26, 2019

If you already have the colours as RGB values, you can convert. There are custom transformers on the hub that will do this conversion for you, e.g. ColorCalculator

If you want to pick colours, this site will give you fme colours

https://www.tydac.ch/color/


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • November 26, 2019

do you have a link to a help? I need more than the basic colors...like cyan and magenta. thanks!

If you already have the colours as RGB values, you can convert. There are custom transformers on the hub that will do this conversion for you, e.g. ColorCalculator

If you want to pick colours, this site will give you fme colours

https://www.tydac.ch/color/


tnarladni
Enthusiast
Forum|alt.badge.img+23
  • Author
  • Enthusiast
  • 88 replies
  • November 26, 2019

If you already have the colours as RGB values, you can convert. There are custom transformers on the hub that will do this conversion for you, e.g. ColorCalculator

If you want to pick colours, this site will give you fme colours

https://www.tydac.ch/color/

could you post this as an answer? so I can accept it? And thanks. that was super helpful. Also, I found that if I divide the R G B color by the full saturation 255, I get the RGB FME value