The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix RGB hex code

These changes was commited to the Birdfont repository Wed, 15 May 2019 22:06:52 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 15 May 2019 22:06:52 +0000 (00:06 +0200)
committer GitHub <noreply@github.com>
Wed, 15 May 2019 22:06:52 +0000 (00:06 +0200)
commit 2068811f7276a0422d404a78f001bc6e98ceb732
tree f854848cdfae6759b1eaabc63653dc93a574a495
parent 2ef9bc2f96bf4e5b115624505e11d2b23dc467a6
Fix RGB hex code

libbirdfont/Color.vala
--- a/libbirdfont/Color.vala +++ b/libbirdfont/Color.vala @@ -215,12 +215,12 @@ public string to_rgb_hex () { string s = "#"; - s += Font.to_hex_code ((unichar) Math.rint (r * 254)); - s += Font.to_hex_code ((unichar) Math.rint (g * 254)); - s += Font.to_hex_code ((unichar) Math.rint (b * 254)); + s += Font.to_hex_code ((unichar) Math.rint (r * 255)); + s += Font.to_hex_code ((unichar) Math.rint (g * 255)); + s += Font.to_hex_code ((unichar) Math.rint (b * 255)); return s; } } }