Skip to content

sikanoumi/inner-palette

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inner Palette

言葉を色に変える、非裁定インターフェース

Inner Palette


自由に書いた文章を、診断や評価ではなく、色の流れとして返します。 言葉の印象をトピックごとの色と質感に変換し、にじみや色片として静かに表示します。

特徴

  • 非裁定 — 良い悪いを判定しない。言葉がどう映ったかだけを色で返す
  • 色と質感 — HSL + texture(clear / muddy / soft / dense)で表現する構造化カラー
  • 4軸のスペクトラム — warm↔cold, calm↔tense, clear↔muddy, light↔heavy

構成

inner-palette/
├── frontend/   # Next.js + TypeScript + Tailwind CSS
├── backend/    # FastAPI + Python + SQLite
├── docs/       # スクリーンショット
└── README.md

セットアップ

Backend

cd backend
python -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt
uvicorn main:app --reload

http://localhost:8000 で起動 → http://localhost:8000/docs で API ドキュメント

Frontend

cd frontend
npm install
npm run dev

http://localhost:3000 で起動

API

Method Endpoint 説明
POST /api/analyze テキストを送信し色パレットを取得
GET /api/history 分析履歴を取得

POST /api/analyze

Request:

{
  "text": "今日は少し不安だけど、前に進みたい"
}

Response:

{
  "id": "a1b2c3d4e5f6",
  "summary": "いくつかの色が浮かびました。これは診断ではなく、言葉の映り方です。",
  "basePalette": [
    { "hue": 263, "saturation": 70, "lightness": 55, "texture": "muddy" },
    { "hue": 0, "saturation": 72, "lightness": 52, "texture": "dense" }
  ],
  "topics": [
    {
      "topicLabel": "不安",
      "excerpt": "今日は少し不安だけど",
      "axes": {
        "warmCold": 0.4,
        "calmTense": 0.8,
        "clearMuddy": 0.7,
        "lightHeavy": 0.6
      },
      "color": { "hue": 263, "saturation": 70, "lightness": 55, "texture": "muddy" },
      "note": "形になりきらないまま、ここに置かれています"
    },
    {
      "topicLabel": "決意",
      "excerpt": "前に進みたい",
      "axes": {
        "warmCold": 0.7,
        "calmTense": 0.6,
        "clearMuddy": 0.3,
        "lightHeavy": 0.7
      },
      "color": { "hue": 0, "saturation": 72, "lightness": 52, "texture": "dense" },
      "note": "奥のほうから出てきた色に見えます"
    }
  ]
}

軸の定義

Key 0 側 1 側
warmCold warm cold
calmTense calm tense
clearMuddy clear muddy
lightHeavy light heavy

texture の語彙

clear / muddy / soft / dense の4種類。

トピック分割について

現在はキーワードベースの軽量ロジックで topic を分割しています。 テキストを句点・読点・改行で区切り、各セグメントに含まれるキーワードから 8カテゴリ(不安・喜び・悲しみ・怒り・決意・希望・静寂・内省)へ振り分けます。 どのキーワードにも該当しない場合は「余白」として扱います。 NLP モデルは使用していないため、文脈や係り受けは考慮されません。

GET /api/history

Response:

{
  "history": [
    {
      "id": "a1b2c3d4e5f6",
      "inputText": "今日は少し不安だけど、前に進みたい",
      "summary": "いくつかの色が浮かびました。これは診断ではなく、言葉の映り方です。",
      "basePalette": [
        { "hue": 263, "saturation": 70, "lightness": 55, "texture": "muddy" }
      ],
      "topics": ["..."],
      "createdAt": "2026-03-25T00:58:00+00:00"
    }
  ]
}

履歴は新しい順に最大20件返されます。

About

A non-judgmental interface that reflects free-form writing as personal color flow.

Topics

Resources

Stars

Watchers

Forks

Contributors