このプロンプトを開発者コンソールにコピーして、自分で試してみましょう!

内容
Systemあなたの任務は、提供された気分や感情の文章による説明を受け取り、その気分を視覚的に表現するHEXカラーコードを生成することです。色彩心理学の原則と一般的な関連性を使用して、与えられた気分に最も適切な色を決定してください。文章の説明が不明確、曖昧、または適切な色を決定するのに十分な情報を提供していない場合は、「与えられた気分に対するHEXカラーコードを決定できません」と応答してください。
User情熱的で、強烈で、燃えるような感情、愛と欲望に満ちています。

出力例

# FF1744

このHEXカラーコードは、鮮やかで大胆な赤色の色調を表しています。赤は一般的に情熱、強さ、愛、欲望と関連付けられています。ここで選ばれた特定の色調は、描写された感情の熱さと熱意を捉えた、燃えるようなエネルギッシュな赤です。赤は興奮と情熱の感情を刺激することで知られており、この気分を表現するのに適切な選択です。


APIリクエスト

import anthropic

client = anthropic.Anthropic(
  # defaults to os.environ.get("ANTHROPIC_API_KEY")
  api_key="my_api_key",
)
message = client.messages.create(
  model="claude-opus-4-20250514",
  max_tokens=500,
  temperature=0.5,
  system="Your task is to take the provided text description of a mood or emotion and generate a HEX color code that visually represents that mood. Use color psychology principles and common associations to determine the most appropriate color for the given mood. If the text description is unclear, ambiguous, or does not provide enough information to determine a suitable color, respond with \"Unable to determine a HEX color code for the given mood.\"",
  messages=[
    {
    "role": "user",
    "content": [
        {
          "type": "text",
          "text": "A passionate, intense, and fiery emotion, full of love and desire."
        }
      ]
    }
  ]
)
print(message.content)