React Native wrapper for cartar.io.
yarn add @ckbab/react-native-cartar
This package depends on react-native-svg
so you need to install it as well.
Note that the examples above are fetched from the latest version of cartar.io so there might be a mismatch between that version and the version of this lib.
import Cartar from "@ckbab/react-native-cartar";
<Cartar size={200} beard={2} beardColor={3} skinColor={2} ... />
Note that skinColor
, hairColor
and beardColor
support both predefined colors (e.g. 3) or custom colors (e.g. #cc00ff
).
Value | Hex code | Example |
---|---|---|
1 | #ffdbac |
|
2 | #f1c27d |
|
3 | #e0ac69 |
|
4 | #c68642 |
|
5 | #8d5524 |
|
6 | #83572e |
|
7 | #624125 |
|
8 | #422d1b |
Value | Hex code | Example |
---|---|---|
1 | #f2e7c7 |
|
2 | #f2e1ae |
|
3 | #f2da91 |
|
4 | #debe99 |
|
5 | #aa8866 |
|
6 | #6d4730 |
|
7 | #4d2d1a |
|
8 | #2d170e |
|
9 | #121821 |
|
10 | #b06500 |
The color is based on the skinColor
value where 1 is light colored beard and 10 is dark colored beard.