Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RGB with hexadecimal color #71

Open
Beyond-Chao opened this issue May 11, 2016 · 0 comments
Open

RGB with hexadecimal color #71

Beyond-Chao opened this issue May 11, 2016 · 0 comments

Comments

@Beyond-Chao
Copy link

Not Work RGB with hexadecimal color ;

example:[UIColor colorWithRGBHex:0xF5F6F7];

  • (UIColor*) colorWithRGBHex: (UInt32) hex {
    int r = (hex >> 16) & 0xFF;
    int g = (hex >> 8) & 0xFF;
    int b = (hex) & 0xFF;
    return [UIColor colorWithRed: r / 255.0f
    green: g / 255.0f
    blue: b / 255.0f
    alpha: 1.0f];
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant