
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
coherent-gameface-color-picker
Advanced tools
The gameface-color-picker is part of the Gameface custom components suite. As most of the components in this suite it uses slots to allow dynamic content.
npm i coherent-gameface-color-picker
The color-picker component comes with UMD builds.
<script src="./node_modules/color-picker/dist/color-picker.production.min.js"></script>
<gameface-color-picker class="color-picker-component"></gameface-color-picker>
This is all! Load the file in Gameface to see the color-picker.
If you wish to import the modules using JavaScript you can remove the script tags which import the components and the color-picker from the node_modules folder and import them like this:
import {ColorPicker} from 'coherent-gameface-color-picker';
or simply
import 'coherent-gameface-color-picker';
Note that this approach requires a module bundler like Webpack or Rollup to resolve the modules from the node_modules folder.
To use simply add
<gameface-color-picker></gameface-color-picker>
To set the initial color of the color picker, you can use the value
attribute and set it to a color in any of the following formats HEX
, HEXA
, RGB
, RGBA
, HSL
and HSLA
.
Example:
<gameface-color-picker value="#FF0000"></gameface-color-picker>
To set the color dynamically you can either set the attribute directly using the DOM APIs
const colorPicker = document.querySelector('gameface-color-picker');
colorPicker.setAttribute('value', ${newValue});
or directly by changing the value
property
colorPicker.value = ${newValue}
The newValue
should be a color string of one of the following formats HEX
, HEXA
, RGB
, RGBA
, HSL
and HSLA
To listen for changes in the color picker you can attach an event listener to the colorchange
event
const colorPicker = document.querySelector('gameface-color-picker');
colorPicker.addEventListener('colorchange', () => {
// Do something
})
FAQs
A component for Coherent Labs Gameface.
The npm package coherent-gameface-color-picker receives a total of 0 weekly downloads. As such, coherent-gameface-color-picker popularity was classified as not popular.
We found that coherent-gameface-color-picker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.