Skip to content

Commit

Permalink
docs: fix getHexCode docs
Browse files Browse the repository at this point in the history
Co-authored-by: Marc Jansen <jansen@terrestris.de>
  • Loading branch information
LukasLohoff and marcjansen committed Jun 21, 2022
1 parent 917677d commit cf1c61d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Util/OlStyleUtil.ts
Original file line number Diff line number Diff line change
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 cf1c61d

Please sign in to comment.