Codemirror-CSS-color-picker
                                
                                
                                
                                    Codemirror-CSS-color-picker copied to clipboard
                            
                            
                            
                        Update extensible `makeColorPicker` factory and CSS parsers
Why
I created a JupyterLab extension which enables to use a color picker in languages other than CSS: https://github.com/krassowski/jupyterlab-color-picker
Instead of shipping a customized version of this package, I would love to depend on a new, more extensible version proposed by this changset.
Closes https://github.com/replit/Codemirror-CSS-color-picker/issues/22
What changed
No user-facing changes
- a new 
makeColorPickerfunction allows to customise the discovery of colors from the syntax tree - the logic for parsing CSS colors from strings was decoupled from tree traversal logic and placed in three exported functions: 
parseCallExpression,parseColorLiteralandparseNamedColor, enabling re-use of these parsing functions parseColorLiteralnow includes a regex check to validate that correct hex color was passed- finally, I added a 
languageargument to expose this information downstream. 
Test plan
There should be no user-facing changes.