diff --git a/src/color.coffee b/src/color.coffee index 3dffabb48..f5f5fca5a 100644 --- a/src/color.coffee +++ b/src/color.coffee @@ -1,5 +1,5 @@ _ = require 'underscore-plus' -ParsedColor = require 'color' +ParsedColor = null # Essential: A simple color class returned from {Config::get} when the value # at the key path is of type 'color'. @@ -16,6 +16,8 @@ class Color return null if _.isArray(value) or _.isFunction(value) return null unless _.isObject(value) or _.isString(value) + ParsedColor ?= require 'color' + try parsedColor = new ParsedColor(value) catch error