Skip to content

Commit

Permalink
fix wrong alpha in full hex color string
Browse files Browse the repository at this point in the history
  • Loading branch information
movch committed Dec 3, 2021
1 parent 2afa1be commit bdcad8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion FigmaAssetsFetch/Models/ColorObjectModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct ColorObjectModel {
let hexColor: String

/// Hex value with alpha of color
let fullHexColor: String
var fullHexColor: String

/// RGBA value of color
var figmaColor: FigmaColor
Expand Down
1 change: 1 addition & 0 deletions FigmaAssetsFetch/Services/PaletteExtractor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ class PaletteExtractor {
// if opacity of ellipse was set we need to take it
if let opacity = ellipse.fills?.first?.opacity {
paletteColor.figmaColor.a = opacity
paletteColor.fullHexColor = paletteColor.figmaColor.toFullHex()
}

return paletteColor
Expand Down

0 comments on commit bdcad8b

Please sign in to comment.