Class ColorInfoTool
Color utilities: contrast ratio, luminance, palette generation, random color.
public sealed class ColorInfoTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
ColorInfoTool
- Implements
- Inherited Members
Examples
Computing contrast ratios for an accessibility-aware UI agent:
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Utility;
var agent = Agent.CreateBuilder(model)
.WithTools(t => t.Register(new ColorInfoTool()))
.Build();
var result = await agent.RunAsync("Is white text readable on a #1E90FF background per WCAG AA?");
Constructors
- ColorInfoTool()
Initializes a new instance of the ColorInfoTool class.
Properties
- Description
Gets a concise description of what the tool does.
- InputSchema
Gets the JSON Schema defining the expected input arguments.
- Name
Gets the stable, unique identifier for this tool.
Methods
- InvokeAsync(string, CancellationToken)
Executes the tool with the specified JSON arguments.