Skip to content

Instantly share code, notes, and snippets.

@HopperMCS
Created February 24, 2017 19:20
Show Gist options
  • Save HopperMCS/895f17210044f9fe56b5fc823e00634d to your computer and use it in GitHub Desktop.
Save HopperMCS/895f17210044f9fe56b5fc823e00634d to your computer and use it in GitHub Desktop.
Sample output using contents of AssetsApplication
[mgagemorgan@localhost AssetsApplication]$ python cairo_rgb_calc.py
Enter the R value to be converted: 0.7
Enter the G value to be converted: 0.20
Enter the B value to be converted: 0.17
Before Cairo, the original RGB values are: 178, 51, 43.
Enter the R value to be converted: 178
Enter the G value to be converted: 51
Enter the B value to be converted: 43
cairo_set_source_rgba(0.7, 0.2, 0.17, 0.8);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment