Skip to content

Commit

Permalink
Merge pull request #563 from LukasLohoff/named-colors-follow-up
Browse files Browse the repository at this point in the history
docs: improve getHexCode docs
  • Loading branch information
KaiVolland committed Jun 22, 2022
2 parents f7c8586 + cf1c61d commit d17ce07
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Util/OlStyleUtil.ts
Expand Up @@ -86,9 +86,8 @@ class OlStyleUtil {
public static getHexCodeFromRgbArray(colorArr: number[]): string {
return '#' + colorArr.map((x, idx) => {
const hex = x.toString(16);
// skip opacity of available
// skip opacity if passed as fourth entry
if (idx < 3) {
// return hex;
return hex.length === 1 ? '0' + hex : hex;
}
return '';
Expand Down

0 comments on commit d17ce07

Please sign in to comment.