{"repo":"projectwallace/color-sorter","free":true,"listed":false,"github":"https://github.com/projectwallace/color-sorter","clone":"git clone https://github.com/projectwallace/color-sorter.git","description":"Sort CSS colors by hue, then by saturation","language":"TypeScript","stars":79,"topics":["css","color-sorting","colors","analytics","stats","complexity","wallace","projectwallace"],"license":"MIT","category":"analytics","readme_excerpt":"color-sorter Sort CSS colors by hue, then by saturation. Black-grey-white colors (colors with 0% saturation) are shifted to the end. Fully transparent colors are placed at the very end. This sorting algorithm is very opinionated and might not fit your needs! Usage Example usage on Stackblitz API convert Convert any CSS color to a color that we can use for comparison. Returns black in case parsing fails. compare Compare two converted colors to know where they must go while sorting. color group Get the named group of a given color. Useful for making groups of colors. sort fn Callback sorting function that can be passed to a .sort() or toSorted() . Uses compare internally. Related projects - CSS Analyzer - Generate analysis for a string of CSS - Wallace CLI - CLI tool for @projectwallace/css-analyzer - CSS Design Tokens - Create Design Tokens by going through CSS to find colors, font-sizes, gradients etcetera and turn them into a Design Tokens spec-compliant token format. License MIT © Bart Veneman","default_branch":null,"files":null,"tree":[],"storefront":"/r/projectwallace","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/projectwallace/color-sorter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}