Miniya Abraham

Miniya Abraham

1590768480

A HSV Color Picker Inspired by Chrome Devtools and a Material Color Picker

flutter_colorpicker

A HSV(HSB)/HSL color picker inspired by chrome devtools and a material color picker for your flutter app.

Web Example

Getting Started

Use it in [showDialog] widget:

// create some values
Color pickerColor = Color(0xff443a49);
Color currentColor = Color(0xff443a49);

// ValueChanged<Color> callback
void changeColor(Color color) {
  setState(() => pickerColor = color);
}

// raise the [showDialog] widget
showDialog(
  context: context,
  child: AlertDialog(
    title: const Text('Pick a color!'),
    content: SingleChildScrollView(
      child: ColorPicker(
        pickerColor: pickerColor,
        onColorChanged: changeColor,
        showLabel: true,
        pickerAreaHeightPercent: 0.8,
      ),
      // Use Material color picker:
      //
      // child: MaterialPicker(
      //   pickerColor: pickerColor,
      //   onColorChanged: changeColor,
      //   showLabel: true, // only on portrait mode
      // ),
      //
      // Use Block color picker:
      //
      // child: BlockPicker(
      //   pickerColor: currentColor,
      //   onColorChanged: changeColor,
      // ),
    ),
    actions: <Widget>[
      FlatButton(
        child: const Text('Got it'),
        onPressed: () {
          setState(() => currentColor = pickerColor);
          Navigator.of(context).pop();
        },
      ),
    ],
  ),
)

preview SlidePicker

Details in example/ folder.

Download Details:

Author: mchome

GitHub: https://github.com/mchome/flutter_colorpicker

#flutter #dart #programming

What is GEEK

Buddha Community

A HSV Color Picker Inspired by Chrome Devtools and a Material Color Picker
Miniya Abraham

Miniya Abraham

1590768480

A HSV Color Picker Inspired by Chrome Devtools and a Material Color Picker

flutter_colorpicker

A HSV(HSB)/HSL color picker inspired by chrome devtools and a material color picker for your flutter app.

Web Example

Getting Started

Use it in [showDialog] widget:

// create some values
Color pickerColor = Color(0xff443a49);
Color currentColor = Color(0xff443a49);

// ValueChanged<Color> callback
void changeColor(Color color) {
  setState(() => pickerColor = color);
}

// raise the [showDialog] widget
showDialog(
  context: context,
  child: AlertDialog(
    title: const Text('Pick a color!'),
    content: SingleChildScrollView(
      child: ColorPicker(
        pickerColor: pickerColor,
        onColorChanged: changeColor,
        showLabel: true,
        pickerAreaHeightPercent: 0.8,
      ),
      // Use Material color picker:
      //
      // child: MaterialPicker(
      //   pickerColor: pickerColor,
      //   onColorChanged: changeColor,
      //   showLabel: true, // only on portrait mode
      // ),
      //
      // Use Block color picker:
      //
      // child: BlockPicker(
      //   pickerColor: currentColor,
      //   onColorChanged: changeColor,
      // ),
    ),
    actions: <Widget>[
      FlatButton(
        child: const Text('Got it'),
        onPressed: () {
          setState(() => currentColor = pickerColor);
          Navigator.of(context).pop();
        },
      ),
    ],
  ),
)

preview SlidePicker

Details in example/ folder.

Download Details:

Author: mchome

GitHub: https://github.com/mchome/flutter_colorpicker

#flutter #dart #programming

Sarama Demsas

Sarama Demsas

1599838800

A HSV/HSL color picker inspired by chrome devtools and material color picker

flutter_colorpicker

A HSV(HSB)/HSL color picker inspired by chrome devtools and a material color picker for your flutter app.

Web Example

Getting Started

Use it in [showDialog] widget:

// create some values
Color pickerColor = Color(0xff443a49);
Color currentColor = Color(0xff443a49);

// ValueChanged<Color> callback
void changeColor(Color color) {
  setState(() => pickerColor = color);
}

// raise the [showDialog] widget
showDialog(
  context: context,
  child: AlertDialog(
    title: const Text('Pick a color!'),
    content: SingleChildScrollView(
      child: ColorPicker(
        pickerColor: pickerColor,
        onColorChanged: changeColor,
        showLabel: true,
        pickerAreaHeightPercent: 0.8,
      ),
      // Use Material color picker:
      //
      // child: MaterialPicker(
      //   pickerColor: pickerColor,
      //   onColorChanged: changeColor,
      //   showLabel: true, // only on portrait mode
      // ),
      //
      // Use Block color picker:
      //
      // child: BlockPicker(
      //   pickerColor: currentColor,
      //   onColorChanged: changeColor,
      // ),
      //
      // child: MultipleChoiceBlockPicker(
      //   pickerColors: currentColors,
      //   onColorsChanged: changeColors,
      // ),
    ),
    actions: <Widget>[
      FlatButton(
        child: const Text('Got it'),
        onPressed: () {
          setState(() => currentColor = pickerColor);
          Navigator.of(context).pop();
        },
      ),
    ],
  ),
)

preview SlidePicker

Details in example/ folder.

Download Details:

Author: mchome

Source Code: https://github.com/mchome/flutter_colorpicker

#flutter #dart #mobile-apps

Sean Robertson

Sean Robertson

1621909899

Chrome 91 - What’s New in DevTools

New to DevTools in Chrome 91:

What’s new in DevTools (Chrome 91) → https://goo.gle/3eLof2N

Memory inspector → https://goo.gle/349mLZY

You’re not seeing double! We published this episode in English and in Jecelyn’s mother language Mandarin as part of our Mother Language Day series.

Tweet us → https://goo.gle/38mi9Ay

What’s New in DevTools → https://goo.gle/2MeR5Kx
Subscribe to Google Chrome Developers → http://goo.gl/LLLNvf

#devtools #chrome #google-chrome

Ethan Hughes

Ethan Hughes

1595460480

Chrome DevTools Like Color Picker Component

Features:

  • Drag interactive color picker allowing for easy use of finding colors, including a Saturation and Lightness box, Hue slider and Opacity slider
  • Reads and outputs HEX(with Alpha), RGBA and HSLA color values
  • Save custom colors to re-use on return to the color picker
  • Full Touch Support
  • ~4kb file size, meaning a super fast component of your application
  • Works on all major browsers (tested on Chrome, Firefox, Edge(Legacy and Chromium version), and more)
  • Flat and modern design interface, inspired by google chrome dev-tools color picker

Examples:

Getting Started:

Installation
  • Install with NPM:
$ npm i @r-tek/colr_pickr
  • If you are using a bundler like Webpack, you can import the module:
// ES6
import pickr from '@r-tek/colr_pickr';

// OR

// CommonJs
const pickr = require('@r-tek/colr_pickr');
  • For now, you’ll need to bring in the CSS file through one of the methods below.

  • Using the CDN via jsDelivr:

<script
	type="text/javascript"
	src="https://cdn.jsdelivr.net/npm/@r-tek/colr_pickr@1.0.1/build/colr_pickr_min.js"
></script>
<link
	rel="stylesheet"
	type="text/css"
	href="https://cdn.jsdelivr.net/npm/@r-tek/colr_pickr@1.0.1/build/colr_pickr_min.css"
/>
  • Alternatively, you could clone/download the repository. Under the /build directory, include the colr_pickr_min.js and the colr_pickr_min.css in your project.
Usage
<!-- Add a button to your HTML document and give it any ID -->

<button id="my_picker"></button>

<!-- The rest is in your JavaScript file, or in this case a script tag -->

<script type="text/javascript">
	/*
	 * Create a new ColorPicker instance, which takes 2 parameters
	 *
	 * Parameter 1 [HTMLElement]: the button you want to launch the editor
	 * Parameter 2 [String] (Optional): A color
	 */

	const button = document.getElementById('my_picker');
	let picker = new ColorPicker(button, '#ff0000');

	/*
	 * What do you want to do after you have chosen the color?
	 *
	 * You can specify this in an EventListener, assigned to your button
	 */

	button.addEventListener('colorChange', function (event) {
		// This will give you the color you selected
		const color = event.detail.color;

		// Code to do what you want with that color...
	});

	/*
	 * You can also change the color yourself via JavaScript
	 *
	 * If you want to change the selected color for an instance without using the picker
	 * You can call the following function
	 *
	 * Parameter 1 [String]: Color
	 * Parameter 2 [HTMLElement]: The button that holds the instance / picker launch button
	 */

	colorChange('#ff00ff', button);
</script>

Color Value Information:

When you give the Color Picker a color value to read, it has to be a supported value format. Colr Pickr support all the popular choices, the table below show all supported value formats:

Format Name Example Format
hex "#ff0000"
hexAlpha "#ff0000ff"
rgb "rgb(255, 0, 0)"
rgba "rgb(255, 0, 0, 1)"
hsl "hsl(360, 100%, 50%)"
hsla "hsla(360, 100%, 50%, 1)"

Changelog:

You can check out the change log for information on latest updates here:

https://github.com/R-TEK/colr_pickr/blob/master/CHANGELOG.md

Contribution:

Read the contribution file for details on developing with the project. You can find the file here:

https://github.com/R-TEK/colr_pickr/blob/master/CONTRIBUTION.md

You can also contribute by issuing any bugs you have found or ideas for new features/optimizations to improve the component. You can do this by going to the issues page and posting your bug / feature. Once I have read the issue, I’ll add it to a Trello road map. With the road map you can vote for items I have added if you like that feature too, and you can view what has been accepted/rejected, what I’m working on and what has been completed.

Download Details:

Author: R-TEK

Live Demo: https://r-tek.github.io/colr_pickr/

GitHub: https://github.com/R-TEK/colr_pickr

#javascript #color picker

Tyrique  Littel

Tyrique Littel

1603450800

Chrome 86 Aims to Bar Abusive Notification Content

Google has added a new feature to Chrome 86 that aims to stomp out abusive notification content.

Web notifications are utilized for a variety of applications – such as prompting site visitors to sign up for newsletters. However, they can also be misused for phishing, malware or fake messages that imitate system notifications for the purpose of generating user interactions. Google has taken steps to battle this issue by automatically blocking the web notifications that display abusive or misleading content.

When visitors encounter a webpage with malicious notification content, the webpage will be blocked and a Chrome alert on the upper navigation bar will warn them that the website might be trying to trick them into displaying intrusive notifications. It will ask them to “Continue Blocking” or “Allow” – the latter option will let users continue on to the webpage.

“Abusive notification prompts are one of the top user complaints we receive about Chrome,” according to PJ McLachlan, product manager with Google, on Wednesday. “Our goal with these changes is to improve the experience for Chrome users and to reduce the incentive for abusive sites to misuse the web-notifications feature.”

In order to detect sites that send abusive notification content, Google will first subscribe occasionally to website push notifications (if the push permission is requested) via its automated web crawling service.

Notifications that are sent to the automated Chrome instances will be evaluated for abusive content, and sites sending abusive notifications will be flagged for enforcement if the issue is unresolved, said Google.

When a site is found to be in “failing” status for any type of notification abuse, Google will send a warning email to the registered owners of the site 30 days before cracking down. During this time, websites can address the issue and request another review.

Google first implemented controls that went against abusive notifications with Chrome 80, when it introduced a “quiet notification permission UI [user interface]” feature. Then, in Chrome 84, it announced auto-enrollment in quiet notification UI for websites with abusive-notification permission requests, such as sites that use deceptive patterns to request notification permissions.

However, the new enforcement in Chrome 86 takes it a step further by focusing “on notification content and is triggered by sites that have a history of sending messages containing abusive content,” said Google. “This treatment applies to sites that try to trick users into accepting the notification permission for malicious purposes, for example sites that use web notifications to send malware or to mimic system messages to obtain user login credentials.”

In an upcoming release, Chrome will revert the notification permission status from “granted” to “default” for abusive origins, preventing further notifications unless the user returns to the abusive origin and re-enables them. That’s because “prior to the release of Chrome’s abusive notifications protections, many users have already unintentionally allowed notifications from websites engaging in abusive activity,” it said.

Google this week also warned of an update to its Chrome browser that patches a zero-day vulnerability in the software’s FreeType font rendering library that was actively being exploited in the wild.

#web security #abusive content #abusive notifications #blocking #browser #browser notifications #chrome 80 #chrome 84 #chrome 86 #google #google chrome #malicious notification #safe browsing #web security