Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Color Converter API - Dart/Flutter Client

Color Converter is a simple tool for converting color formats. It returns the color converted to the specified format.

pub package License: MIT

This is the Dart/Flutter client for the Color Converter API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_colorconverter: ^1.1.14

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage

import 'package:apiverve_colorconverter/apiverve_colorconverter.dart';

void main() async {
  final client = ColorconverterClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'hex': 'FF0000'
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response

{
  "status": "ok",
  "error": null,
  "data": {
    "hex": "#FF0000",
    "rgb": "255, 0, 0",
    "hsl": "0, 100, 50",
    "cmyk": "0, 100, 100, 0",
    "ansi16": 91,
    "name": "red",
    "channels": {
      "rgbChannels": 3,
      "cmykChannels": 4,
      "ansiChannels": 1,
      "hexChannels": 1,
      "hslChannels": 3
    }
  }
}

API Reference

Authentication

All requests require an API key. Get yours at apiverve.com.

License

MIT License - see LICENSE for details.


Built with Dart for APIVerve