将此提示复制到我们的开发者控制台中,亲自尝试!

内容
System你的任务是将提供的情绪或感受的文字描述转换为视觉上代表该情绪的十六进制颜色代码。使用色彩心理学原理和常见关联来确定最适合给定情绪的颜色。如果文字描述不清楚、模糊或没有提供足够的信息来确定合适的颜色,请回复”无法为给定情绪确定十六进制颜色代码。“
User一种充满激情、强烈且炽热的情感,充满爱与欲望。

示例输出

# FF1744

这个十六进制颜色代码代表一种鲜艳、大胆的红色。红色通常与激情、强烈、爱和欲望相关联。这里选择的特定色调是一种炽热、充满活力的红色,捕捉了所描述情感的热度和热情。红色被认为能刺激兴奋和激情的感觉,使其成为表达这种情绪的适当选择。


API 请求

import anthropic

client = anthropic.Anthropic(
  # 默认为 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)