Newbie question / text color

I would like to know the correct way to get a specific color for my texts. I can easily identify the RGB of each color but by putting those numbers in my code Corona SDK does not show me the correct color. Is there any way I can get the right RGB for Corona SDK?

The color I want:

​  *IMG 1 -

   105, 255, 0 - from the Photoshop RGB

The color shown by Corona Simulator:

​  *IMG 2 -

   252, 252, 19 - from the Photoshop RGB

In short, if I look for an RGB color in Photoshop and I put it in my code Corona SDK shows me another color.

Thanks in advance

To use setFillColor, you pass values between 0 and 1.  If you have the RGB colors, you can set it like this (using your example above):

myImage:setFillColor(252/255, 252/255, 19/255)

–john

Show us your code.

I suspect you’re doing this:

obj:setFillColor(105, 255, 0)

when this is correct:

obj:setFillColor(0.41, 1, 0)

Note too, in the future please use a meaningful post title.

Calling the post “newbie question” in the newbie forums is redundant and doesn’t help future readers with a similar question find the post.

Thanks to both!

Post Name: Newbie question

Tags: color, text

I try to make some clear posts to try to help others. The tags have helped me a lot to find information in the search field

:)  :)  :slight_smile:

Post name edited, be happy!

:rolleyes: 

To use setFillColor, you pass values between 0 and 1.  If you have the RGB colors, you can set it like this (using your example above):

myImage:setFillColor(252/255, 252/255, 19/255)

–john

Show us your code.

I suspect you’re doing this:

obj:setFillColor(105, 255, 0)

when this is correct:

obj:setFillColor(0.41, 1, 0)

Note too, in the future please use a meaningful post title.

Calling the post “newbie question” in the newbie forums is redundant and doesn’t help future readers with a similar question find the post.

Thanks to both!

Post Name: Newbie question

Tags: color, text

I try to make some clear posts to try to help others. The tags have helped me a lot to find information in the search field

:)  :)  :slight_smile:

Post name edited, be happy!

:rolleyes: