Skip to content

UIColour only supports RGB values up to 1.0F #1

@aledbrown

Description

@aledbrown

Drawscript is a fabulous idea.

I was just writing a list of colours in Xcode and I thought... I'll try Drawscript and copy and paste them in but I found an issue.

Example orange colour values from Drawscript:
[UIColor colorWithRed: 247 green: 147 blue: 30 alpha: 100]

This produces white not orange.

To work properly it needs to be:
[UIColor colorWithRed: 247.0F/255.0F green: 147.0F/255.0F blue: 30.0F/255.0F alpha: 1.0F]

Each R G B value in UIColour has a max value of 1.0 as a Float.

Hope this helps.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions