Color Name API

Default

getColorLists

Get available color name lists

Returns a list of available color name lists with descriptions and URLs to the color list endpoints. If a specific list key is provided via the 'list' query parameter, only the description for that list will be returned.


/lists/

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.color.pizza/v1/lists/?list="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        PossibleLists list = ; // PossibleLists | The name of a specific color name list to retrieve details for

        try {
            ColorListsResponse result = apiInstance.getColorLists(list);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getColorLists");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        PossibleLists list = ; // PossibleLists | The name of a specific color name list to retrieve details for

        try {
            ColorListsResponse result = apiInstance.getColorLists(list);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getColorLists");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
PossibleLists *list = ; // The name of a specific color name list to retrieve details for (optional) (default to null)

// Get available color name lists
[apiInstance getColorListsWith:list
              completionHandler: ^(ColorListsResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ColorNameApi = require('color_name_api');

// Create an instance of the API class
var api = new ColorNameApi.DefaultApi()
var opts = {
  'list':  // {PossibleLists} The name of a specific color name list to retrieve details for
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getColorLists(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getColorListsExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var list = new PossibleLists(); // PossibleLists | The name of a specific color name list to retrieve details for (optional)  (default to null)

            try {
                // Get available color name lists
                ColorListsResponse result = apiInstance.getColorLists(list);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.getColorLists: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$list = ; // PossibleLists | The name of a specific color name list to retrieve details for

try {
    $result = $api_instance->getColorLists($list);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getColorLists: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $list = ; # PossibleLists | The name of a specific color name list to retrieve details for

eval {
    my $result = $api_instance->getColorLists(list => $list);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getColorLists: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
list =  # PossibleLists | The name of a specific color name list to retrieve details for (optional) (default to null)

try:
    # Get available color name lists
    api_response = api_instance.get_color_lists(list=list)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getColorLists: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let list = ; // PossibleLists

    let mut context = DefaultApi::Context::default();
    let result = client.getColorLists(list, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
list
PossibleLists
The name of a specific color name list to retrieve details for

Responses


getColorNames

Get color names for specific hex values

Returns an array of colors from the specified list, with distance calculations to show how close each match is to the requested colors. When providing multiple values, the endpoint will find the closest match for each color. If no colors are provided, returns all colors from the specified list. When the server has socket.io enabled, this endpoint will also emit a 'colors' event with the same response data to all connected socket clients.


/

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.color.pizza/v1/?list=&values=values_example&noduplicates=true&goodnamesonly=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        PossibleLists list = ; // PossibleLists | The name of the color name list to use (case-sensitive)
        String values = values_example; // String | A comma-separated list of hex values (e.g., `FF0000,00FF00` do not include the `#`)
        Boolean noduplicates = true; // Boolean | When true, ensures each color gets a unique name even when colors are similar
        Boolean goodnamesonly = true; // Boolean | When true, uses the 'bestOf' list automatically

        try {
            ColorResponse result = apiInstance.getColorNames(list, values, noduplicates, goodnamesonly);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getColorNames");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        PossibleLists list = ; // PossibleLists | The name of the color name list to use (case-sensitive)
        String values = values_example; // String | A comma-separated list of hex values (e.g., `FF0000,00FF00` do not include the `#`)
        Boolean noduplicates = true; // Boolean | When true, ensures each color gets a unique name even when colors are similar
        Boolean goodnamesonly = true; // Boolean | When true, uses the 'bestOf' list automatically

        try {
            ColorResponse result = apiInstance.getColorNames(list, values, noduplicates, goodnamesonly);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getColorNames");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
PossibleLists *list = ; // The name of the color name list to use (case-sensitive) (optional) (default to null)
String *values = values_example; // A comma-separated list of hex values (e.g., `FF0000,00FF00` do not include the `#`) (optional) (default to null)
Boolean *noduplicates = true; // When true, ensures each color gets a unique name even when colors are similar (optional) (default to null)
Boolean *goodnamesonly = true; // When true, uses the 'bestOf' list automatically (optional) (default to null)

// Get color names for specific hex values
[apiInstance getColorNamesWith:list
    values:values
    noduplicates:noduplicates
    goodnamesonly:goodnamesonly
              completionHandler: ^(ColorResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ColorNameApi = require('color_name_api');

// Create an instance of the API class
var api = new ColorNameApi.DefaultApi()
var opts = {
  'list': , // {PossibleLists} The name of the color name list to use (case-sensitive)
  'values': values_example, // {String} A comma-separated list of hex values (e.g., `FF0000,00FF00` do not include the `#`)
  'noduplicates': true, // {Boolean} When true, ensures each color gets a unique name even when colors are similar
  'goodnamesonly': true // {Boolean} When true, uses the 'bestOf' list automatically
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getColorNames(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getColorNamesExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var list = new PossibleLists(); // PossibleLists | The name of the color name list to use (case-sensitive) (optional)  (default to null)
            var values = values_example;  // String | A comma-separated list of hex values (e.g., `FF0000,00FF00` do not include the `#`) (optional)  (default to null)
            var noduplicates = true;  // Boolean | When true, ensures each color gets a unique name even when colors are similar (optional)  (default to null)
            var goodnamesonly = true;  // Boolean | When true, uses the 'bestOf' list automatically (optional)  (default to null)

            try {
                // Get color names for specific hex values
                ColorResponse result = apiInstance.getColorNames(list, values, noduplicates, goodnamesonly);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.getColorNames: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$list = ; // PossibleLists | The name of the color name list to use (case-sensitive)
$values = values_example; // String | A comma-separated list of hex values (e.g., `FF0000,00FF00` do not include the `#`)
$noduplicates = true; // Boolean | When true, ensures each color gets a unique name even when colors are similar
$goodnamesonly = true; // Boolean | When true, uses the 'bestOf' list automatically

try {
    $result = $api_instance->getColorNames($list, $values, $noduplicates, $goodnamesonly);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getColorNames: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $list = ; # PossibleLists | The name of the color name list to use (case-sensitive)
my $values = values_example; # String | A comma-separated list of hex values (e.g., `FF0000,00FF00` do not include the `#`)
my $noduplicates = true; # Boolean | When true, ensures each color gets a unique name even when colors are similar
my $goodnamesonly = true; # Boolean | When true, uses the 'bestOf' list automatically

eval {
    my $result = $api_instance->getColorNames(list => $list, values => $values, noduplicates => $noduplicates, goodnamesonly => $goodnamesonly);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getColorNames: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
list =  # PossibleLists | The name of the color name list to use (case-sensitive) (optional) (default to null)
values = values_example # String | A comma-separated list of hex values (e.g., `FF0000,00FF00` do not include the `#`) (optional) (default to null)
noduplicates = true # Boolean | When true, ensures each color gets a unique name even when colors are similar (optional) (default to null)
goodnamesonly = true # Boolean | When true, uses the 'bestOf' list automatically (optional) (default to null)

try:
    # Get color names for specific hex values
    api_response = api_instance.get_color_names(list=list, values=values, noduplicates=noduplicates, goodnamesonly=goodnamesonly)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getColorNames: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let list = ; // PossibleLists
    let values = values_example; // String
    let noduplicates = true; // Boolean
    let goodnamesonly = true; // Boolean

    let mut context = DefaultApi::Context::default();
    let result = client.getColorNames(list, values, noduplicates, goodnamesonly, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
list
PossibleLists
The name of the color name list to use (case-sensitive)
values
String
A comma-separated list of hex values (e.g., `FF0000,00FF00` do not include the `#`)
noduplicates
Boolean
When true, ensures each color gets a unique name even when colors are similar
goodnamesonly
Boolean
When true, uses the 'bestOf' list automatically

Responses


getColorSwatch

Generate a color swatch for any color

Generates an SVG swatch representation of a color. The swatch can include the color name if provided. The SVG is designed to be visually appealing and readable across different backgrounds.


/swatch/

Usage and SDK Samples

curl -X GET \
 -H "Accept: image/svg+xml,application/json" \
 "https://api.color.pizza/v1/swatch/?color=color_example&name=name_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        String color = color_example; // String | The hex value of the color to retrieve without '#'
        String name = name_example; // String | The name of the color to display on the swatch

        try {
            'String' result = apiInstance.getColorSwatch(color, name);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getColorSwatch");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String color = color_example; // String | The hex value of the color to retrieve without '#'
        String name = name_example; // String | The name of the color to display on the swatch

        try {
            'String' result = apiInstance.getColorSwatch(color, name);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getColorSwatch");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *color = color_example; // The hex value of the color to retrieve without '#' (default to null)
String *name = name_example; // The name of the color to display on the swatch (optional) (default to null)

// Generate a color swatch for any color
[apiInstance getColorSwatchWith:color
    name:name
              completionHandler: ^('String' output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ColorNameApi = require('color_name_api');

// Create an instance of the API class
var api = new ColorNameApi.DefaultApi()
var color = color_example; // {String} The hex value of the color to retrieve without '#'
var opts = {
  'name': name_example // {String} The name of the color to display on the swatch
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getColorSwatch(color, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getColorSwatchExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var color = color_example;  // String | The hex value of the color to retrieve without '#' (default to null)
            var name = name_example;  // String | The name of the color to display on the swatch (optional)  (default to null)

            try {
                // Generate a color swatch for any color
                'String' result = apiInstance.getColorSwatch(color, name);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.getColorSwatch: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$color = color_example; // String | The hex value of the color to retrieve without '#'
$name = name_example; // String | The name of the color to display on the swatch

try {
    $result = $api_instance->getColorSwatch($color, $name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getColorSwatch: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $color = color_example; # String | The hex value of the color to retrieve without '#'
my $name = name_example; # String | The name of the color to display on the swatch

eval {
    my $result = $api_instance->getColorSwatch(color => $color, name => $name);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getColorSwatch: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
color = color_example # String | The hex value of the color to retrieve without '#' (default to null)
name = name_example # String | The name of the color to display on the swatch (optional) (default to null)

try:
    # Generate a color swatch for any color
    api_response = api_instance.get_color_swatch(color, name=name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getColorSwatch: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let color = color_example; // String
    let name = name_example; // String

    let mut context = DefaultApi::Context::default();
    let result = client.getColorSwatch(color, name, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
color*
String
The hex value of the color to retrieve without '#'
Required
name
String
The name of the color to display on the swatch

Responses


getDocumentation

Get API Documentation

Serves the static HTML documentation page for the API.


/docs/

Usage and SDK Samples

curl -X GET \
 -H "Accept: text/html" \
 "https://api.color.pizza/v1/docs/"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();

        try {
            'String' result = apiInstance.getDocumentation();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getDocumentation");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();

        try {
            'String' result = apiInstance.getDocumentation();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#getDocumentation");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Get API Documentation
[apiInstance getDocumentationWithCompletionHandler: 
              ^('String' output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ColorNameApi = require('color_name_api');

// Create an instance of the API class
var api = new ColorNameApi.DefaultApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDocumentation(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class getDocumentationExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();

            try {
                // Get API Documentation
                'String' result = apiInstance.getDocumentation();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.getDocumentation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();

try {
    $result = $api_instance->getDocumentation();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->getDocumentation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();

eval {
    my $result = $api_instance->getDocumentation();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->getDocumentation: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()

try:
    # Get API Documentation
    api_response = api_instance.get_documentation()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->getDocumentation: %s\n" % e)
extern crate DefaultApi;

pub fn main() {

    let mut context = DefaultApi::Context::default();
    let result = client.getDocumentation(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


searchColorsByName

Search for colors by name

Returns colors whose names contain the search string. The search is case-insensitive. The search string must be at least 3 characters long.


/names/

Usage and SDK Samples

curl -X GET \
 -H "Accept: application/json" \
 "https://api.color.pizza/v1/names/?name=name_example&list="
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {
    public static void main(String[] args) {

        // Create an instance of the API class
        DefaultApi apiInstance = new DefaultApi();
        String name = name_example; // String | The search term to look for in color names (min 3 characters)
        PossibleLists list = ; // PossibleLists | The name of the color name list to search in

        try {
            ColorNameSearchResponse result = apiInstance.searchColorsByName(name, list);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#searchColorsByName");
            e.printStackTrace();
        }
    }
}
import org.openapitools.client.api.DefaultApi;

public class DefaultApiExample {
    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String name = name_example; // String | The search term to look for in color names (min 3 characters)
        PossibleLists list = ; // PossibleLists | The name of the color name list to search in

        try {
            ColorNameSearchResponse result = apiInstance.searchColorsByName(name, list);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#searchColorsByName");
            e.printStackTrace();
        }
    }
}


// Create an instance of the API class
DefaultApi *apiInstance = [[DefaultApi alloc] init];
String *name = name_example; // The search term to look for in color names (min 3 characters) (optional) (default to null)
PossibleLists *list = ; // The name of the color name list to search in (optional) (default to null)

// Search for colors by name
[apiInstance searchColorsByNameWith:name
    list:list
              completionHandler: ^(ColorNameSearchResponse output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var ColorNameApi = require('color_name_api');

// Create an instance of the API class
var api = new ColorNameApi.DefaultApi()
var opts = {
  'name': name_example, // {String} The search term to look for in color names (min 3 characters)
  'list':  // {PossibleLists} The name of the color name list to search in
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.searchColorsByName(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class searchColorsByNameExample
    {
        public void main()
        {

            // Create an instance of the API class
            var apiInstance = new DefaultApi();
            var name = name_example;  // String | The search term to look for in color names (min 3 characters) (optional)  (default to null)
            var list = new PossibleLists(); // PossibleLists | The name of the color name list to search in (optional)  (default to null)

            try {
                // Search for colors by name
                ColorNameSearchResponse result = apiInstance.searchColorsByName(name, list);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling DefaultApi.searchColorsByName: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\DefaultApi();
$name = name_example; // String | The search term to look for in color names (min 3 characters)
$list = ; // PossibleLists | The name of the color name list to search in

try {
    $result = $api_instance->searchColorsByName($name, $list);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->searchColorsByName: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::DefaultApi;

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::DefaultApi->new();
my $name = name_example; # String | The search term to look for in color names (min 3 characters)
my $list = ; # PossibleLists | The name of the color name list to search in

eval {
    my $result = $api_instance->searchColorsByName(name => $name, list => $list);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->searchColorsByName: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Create an instance of the API class
api_instance = openapi_client.DefaultApi()
name = name_example # String | The search term to look for in color names (min 3 characters) (optional) (default to null)
list =  # PossibleLists | The name of the color name list to search in (optional) (default to null)

try:
    # Search for colors by name
    api_response = api_instance.search_colors_by_name(name=name, list=list)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->searchColorsByName: %s\n" % e)
extern crate DefaultApi;

pub fn main() {
    let name = name_example; // String
    let list = ; // PossibleLists

    let mut context = DefaultApi::Context::default();
    let result = client.searchColorsByName(name, list, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
name
String
The search term to look for in color names (min 3 characters)
list
PossibleLists
The name of the color name list to search in

Responses