# 이미지 편집기 — 개발자용 라이브러리

이미지 편집기의 데이터와 보조 함수: 색상 팔레트, 도형, 색 변환, 29개 언어의 색 이름.

## 설치

```sh
npm install @openlibsdev/image-editor
```

```js
import ImageEditor from "https://cdn.jsdelivr.net/npm/@openlibsdev/image-editor@1.0.0/+esm";
```

## 사용법

```js
import ImageEditor from "@openlibsdev/image-editor";

console.log(ImageEditor.toHex("rgb(13, 110, 253)"));   // "#0d6efd"
console.log(ImageEditor.hexA("#0d6efd", 0.5));
const color = await ImageEditor.findNamedColor("dark blue", "en");
```

## API

### `ImageEditor.toHex(c)`

모든 CSS 색상 → #rrggbb.

### `ImageEditor.hexA(hex, a)`

투명도가 있는 색.

### `ImageEditor.PALETTE`

기본 팔레트.

### `ImageEditor.SHAPES`

도형.

### `ImageEditor.starPoints()`

별 모양의 꼭짓점.

### `ImageEditor.findNamedColor(text, lang)`

지정한 언어의 색 이름으로 이름 있는 색을 찾습니다(“진한 파랑” → #00008b).

### `ImageEditor.listNamedColors(lang)`

이름 있는 색을 지정한 언어의 이름과 함께 나열합니다.

### `ImageEditor.EXTRA`

표준 속성(이름, 잠금, id, 혼합 모드) 외에 프로젝트와 함께 저장되는 객체 속성의 이름.

### `ImageEditor.LBL`

객체 종류별 기본 레이어 이름(사각형, 타원, 텍스트, 이미지, 그룹, …).

### `ImageEditor.namedColorTexts(lang)`

지정한 언어의 색상 필드 라벨(색 선택기의 텍스트). 해당 언어가 없으면 영어.

### `ImageEditor.textFontData`

텍스트와 글꼴 블록의 데이터: 글꼴 목록, 스타일 불러오기, 글꼴 파일 추가, 언어별 블록 라벨, 기본값.

### `ImageEditor.APP`

라이브러리의 이름과 버전: {name, version}.

## 의존성

- @imagemagick/magick-wasm 0.0.35 (Apache-2.0)
- @imagemagick/magick-wasm 0.0.35 (Apache-2.0)
- @simonwep/pickr 1.10.2 (MIT)
- @simonwep/pickr 1.10.2 (MIT)
- dejavu-fonts-ttf 2.37.3 (Bitstream Vera Fonts License (free, redistributable); DejaVu changes are public domain)
- fabric 5.3.0 (MIT)
- imagetracerjs 1.2.6 (Unlicense)
- jspdf 2.5.2 (MIT)

- GitHub: https://github.com/OpenLibsDev/image-editor
- npm: https://www.npmjs.com/package/@openlibsdev/image-editor
- 앱 열기: https://openlibs.dev/ko/app/image-editor/
