diff --git a/SketchColorPalette.sketchplugin/Contents/Sketch/export.cocoascript b/SketchColorPalette.sketchplugin/Contents/Sketch/export.cocoascript index fa61633..51ca198 100644 --- a/SketchColorPalette.sketchplugin/Contents/Sketch/export.cocoascript +++ b/SketchColorPalette.sketchplugin/Contents/Sketch/export.cocoascript @@ -28,12 +28,12 @@ function onRun(context) { function fillColorFromShape(shape) { let fill = shape.style().fills().firstObject(); - var red = fill.color().red().toFixed(3).toString(); - var green = fill.color().green().toFixed(3).toString(); - var blue = fill.color().blue().toFixed(3).toString(); - var alpha = fill.color().alpha().toFixed(3).toString(); + var red = fill.color().red(); + var green = fill.color().green(); + var blue = fill.color().blue(); + var alpha = fill.color().alpha(); - var color = [NSColor colorWithRed:red green:green blue:blue alpha:alpha]; + var color = [NSColor colorWithSRGBRed:red green:green blue:blue alpha:alpha]; return color } diff --git a/SketchColorPalette.sketchplugin/Contents/Sketch/manifest.json b/SketchColorPalette.sketchplugin/Contents/Sketch/manifest.json index fa5b7bb..843f494 100644 --- a/SketchColorPalette.sketchplugin/Contents/Sketch/manifest.json +++ b/SketchColorPalette.sketchplugin/Contents/Sketch/manifest.json @@ -4,7 +4,7 @@ "author": "Kohei Tabata", "authorEmail": "nerd0geek1@gmail.com", "homepage": "https://github.com/nerd0geek1/SketchColorPalette", - "version": "1.0.0", + "version": "1.0.1", "identifier": "com.nerd0geek1.sketch.SketchColorPalette", "compatibleVersion": 42, "commands": [