@plaqard/zone-image
Generate random image for each zone.
Image contains zone ID as text (centered vertically and horizontally), and random background and text color, taking into account contrast between two colors.
Install
npm install @plaqard/zone-image --save
Usage
import plaqard from '@plaqard/core';
import ImageZone from '@plaqard/zone-image';
(async () => {
const instance = plaqard({
// …
zones: [
{
id: 'becky',
dimensions: { width: 300, height: 600 },
contentType: ImageZone
}
]
});
await instance.start();
})();
License
MIT © Ivan Nikolić