mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-09-19 16:46:11 -04:00
0.2.1 map2colour
This commit is contained in:
parent
dbc83b1599
commit
0e496eb113
@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
|
||||
## [0.2.1] - 2023-11-05
|
||||
- update readme.md
|
||||
- minor edits
|
||||
|
||||
|
||||
## [0.2.0] - 2023-04-24
|
||||
- add dynamic size in constructor (minimum 7 for backwards)
|
||||
- add destructor.
|
||||
|
@ -2,8 +2,11 @@
|
||||
[![Arduino CI](https://github.com/RobTillaart/map2colour/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
|
||||
[![Arduino-lint](https://github.com/RobTillaart/map2colour/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/map2colour/actions/workflows/arduino-lint.yml)
|
||||
[![JSON check](https://github.com/RobTillaart/map2colour/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/map2colour/actions/workflows/jsoncheck.yml)
|
||||
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/map2colour.svg)](https://github.com/RobTillaart/map2colour/issues)
|
||||
|
||||
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/map2colour/blob/master/LICENSE)
|
||||
[![GitHub release](https://img.shields.io/github/release/RobTillaart/map2colour.svg?maxAge=3600)](https://github.com/RobTillaart/map2colour/releases)
|
||||
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/map2colour.svg)](https://registry.platformio.org/libraries/robtillaart/map2colour)
|
||||
|
||||
|
||||
# map2colour
|
||||
@ -60,6 +63,12 @@ If returned false the code might behave in unexpected ways.
|
||||
Please note that the colourMap can have duplicate entries even side by side.
|
||||
|
||||
|
||||
#### Related
|
||||
|
||||
- https://github.com/RobTillaart/Kelvin2RGB
|
||||
- https://github.com/RobTillaart/map2colour
|
||||
|
||||
|
||||
## Interface
|
||||
|
||||
```cpp
|
||||
@ -118,7 +127,6 @@ Note that only 3 bytes of 4 of the 32 bit colour patterns are used.
|
||||
The 4th byte might be used in the future.
|
||||
|
||||
|
||||
|
||||
## Operation
|
||||
|
||||
See examples.
|
||||
@ -245,7 +253,6 @@ Note that the larger the size the more time it takes to find the correct interva
|
||||
- look for optimizations.
|
||||
- cache last value?
|
||||
|
||||
|
||||
#### Could
|
||||
|
||||
- create a memory efficient version
|
||||
@ -253,6 +260,8 @@ Note that the larger the size the more time it takes to find the correct interva
|
||||
- split RGB channels for every mapping.
|
||||
- is this useful? only for smallest RAM devices.
|
||||
- remove default array and break backwards compatibility.
|
||||
- rename **map2_565()** to **map2RGB565()**
|
||||
- add **map2CMYK()**
|
||||
|
||||
|
||||
#### Wont
|
||||
@ -286,3 +295,11 @@ Note that the larger the size the more time it takes to find the correct interva
|
||||
- divfactors need to be calculated again?
|
||||
- see no real use case.
|
||||
|
||||
|
||||
## Support
|
||||
|
||||
If you appreciate my libraries, you can support the development and maintenance.
|
||||
Improve the quality of the libraries by providing issues and Pull Requests, or
|
||||
donate through PayPal or GitHub sponsors.
|
||||
|
||||
Thank you,
|
||||
|
@ -15,9 +15,9 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/map2colour.git"
|
||||
},
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
"headers": "map2colour.h"
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=map2colour
|
||||
version=0.2.0
|
||||
version=0.2.1
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Arduino library for mapping a float to colour spectrum
|
||||
|
@ -5,8 +5,8 @@
|
||||
// PURPOSE: Arduino library for mapping a float to colour spectrum
|
||||
// URL: https://github.com/RobTillaart/map2colour
|
||||
|
||||
|
||||
// https://www.w3.org/wiki/CSS/Properties/color/keywords
|
||||
|
||||
#define M2C_BLACK 0x00000000
|
||||
#define M2C_SILVER 0x00C0C0C0
|
||||
#define M2C_GRAY 0x00808080
|
||||
|
@ -1,7 +1,7 @@
|
||||
//
|
||||
// FILE: map2colour.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.2.0
|
||||
// VERSION: 0.2.1
|
||||
// PURPOSE: Arduino library for mapping a float to colour spectrum
|
||||
// URL: https://github.com/RobTillaart/map2colour
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
#define M2C_MIN_SIZE 7
|
||||
|
||||
|
||||
map2colour::map2colour(uint8_t size)
|
||||
{
|
||||
_size = size;
|
||||
|
@ -2,7 +2,7 @@
|
||||
//
|
||||
// FILE: map2colour.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.2.0
|
||||
// VERSION: 0.2.1
|
||||
// PURPOSE: Arduino library for mapping a float to colour spectrum
|
||||
// URL: https://github.com/RobTillaart/map2colour
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include "m2c_colours.h"
|
||||
|
||||
|
||||
#define MAP2COLOUR_LIB_VERSION (F("0.2.0"))
|
||||
#define MAP2COLOUR_LIB_VERSION (F("0.2.1"))
|
||||
|
||||
|
||||
class map2colour
|
||||
|
Loading…
Reference in New Issue
Block a user