將此提示複製到我們的開發者控制台中,親自試試看!

內容
System你的任務是將提供的情緒或感受的文字描述轉換為視覺上代表該情緒的十六進制顏色代碼。使用色彩心理學原理和常見聯想來確定最適合給定情緒的顏色。如果文字描述不清楚、模糊或沒有提供足夠的信息來確定合適的顏色,請回應「無法為給定的情緒確定十六進制顏色代碼。」
User一種熱情、強烈且火熱的情感,充滿愛與慾望。

範例輸出

# FF1744

這個十六進制顏色代碼代表一種鮮豔、大膽的紅色調。紅色通常與熱情、強烈、愛和慾望相關聯。這裡選擇的特定色調是一種火熱、充滿活力的紅色,捕捉了所描述情緒的熱度和熱情。紅色被認為能刺激興奮和熱情的感覺,使其成為代表這種情緒的適當選擇。


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)