nl_tokens: Retrieves a palette from theme references . Is defined as {{ paletteName }} . {{ palette . property }} | {{ colorManipulation }} Example : # theme . yaml color : !palette primary . color|accent
pl_tokens: function ( values , yamlLoader ) { var palettes = luiTheme ( 'core.references.palettes' ) , palette = values . split ( '|' ) [ 0 ] , paletteName = palette . <mask> ( '.' ) [ 0 ] , paletteProp = ( palette . split ( '.' ) [ 1 ] ) ? palette . split ( '.' ) [ 1 ] : null , manipulation = ( values . split ( '|' ) [ 1 ] ) ? values . split ( '|' ) [ 1 ] : null , result = palettes . colors [ paletteName ] ; if ( paletteProp && result [ paletteProp ] ) result = result [ paletteProp ] ; if ( manipulation ) { result = palettes . manipulations [ manipulation ] [ 0 ] + '(' + result + ', ' + palettes . manipulations [ manipulation ] [ 1 ] + ')' ; } return result ; }