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

内容
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-3-7-sonnet-20250219",
  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)

Was this page helpful?