@pikas-utils/file

This package contains a avatar component.

Change Log

Installation

You can install this package using npm, yarn, or pnpm.

npm install @pikas-utils/file
yarn add @pikas-utils/file
pnpm add @pikas-utils/file

Usage

getColorByExtension

Return a color based on the file extension.

Colors are based on the Mikael Edwards color palette.

3g2
3gp
aac
ai
aiff
asp
avi
bmp
c
cpp
css
dat
dmg
doc
docx
dot
dotx
dwg
dxf
eps
exe
flv
gif
h
ics
iso
java
jpg
key
m4v
mid
mov
mp3
mp4
mpg
odp
ods
odt
otp
ots
ott
pdf
php
png
pps
ppt
psd
py
qt
rar
rb
rtf
sql
tga
tgz
tiff
txt
wav
xls
xlsx
xml
yml
zip
import { getColorByExtension } from '@pikas-utils/file';

getColorByExtension('png');
// => '#df7971'

Contributing

This documentation can be edited on GitHub here