Skip to content

Commit

Permalink
Stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Thunear committed Aug 16, 2024
1 parent c1945aa commit 1ba7ff4
Show file tree
Hide file tree
Showing 71 changed files with 3,176 additions and 408 deletions.
8 changes: 4 additions & 4 deletions packages/cli/src/colors/colorUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,16 @@ export const HSLToHex = (h: number, s: number, l: number) => {
* @param hex A hex color string
* @returns RGB values in an array
*/
export const hexToRgb = (hex: string) => {
export const hexToRgb = (hex: string, type: '255' | '1' = '255') => {
const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
hex = hex.replace(shorthandRegex, (m, r: string, g: string, b: string) => r + r + g + g + b + b);

const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result
? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16),
r: type === '255' ? parseInt(result[1], 16) : parseInt(result[1], 16) / 255,
g: type === '255' ? parseInt(result[2], 16) : parseInt(result[2], 16) / 255,
b: type === '255' ? parseInt(result[3], 16) : parseInt(result[3], 16) / 255,
}
: null;
};
Expand Down
68 changes: 0 additions & 68 deletions plugins/figma-plugin/src/plugin/plugin.ts

This file was deleted.

59 changes: 0 additions & 59 deletions plugins/figma-plugin/src/ui/App.css

This file was deleted.

48 changes: 0 additions & 48 deletions plugins/figma-plugin/src/ui/app.tsx

This file was deleted.

40 changes: 0 additions & 40 deletions plugins/figma-plugin/src/ui/components/Footer/Footer.css

This file was deleted.

26 changes: 0 additions & 26 deletions plugins/figma-plugin/src/ui/components/Footer/Footer.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions plugins/figma-plugin/src/ui/index.html

This file was deleted.

Loading

0 comments on commit 1ba7ff4

Please sign in to comment.