aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2023-03-27 18:52:12 +0700
committerGitHub <[email protected]>2023-03-27 11:52:12 +0000
commit2a4f137391dc48d72268823a446f5c128410a215 (patch)
tree98e92fc661edea2b4dcdda9541ad820e1448a8a7 /src/modules
parent87a5ba9896749d8bb6f0c7c84185f3f0a23f2f1f (diff)
downloadfaker-2a4f137391dc48d72268823a446f5c128410a215.tar.xz
faker-2a4f137391dc48d72268823a446f5c128410a215.zip
docs(color): improve rgb examples (#1970)
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/color/index.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/color/index.ts b/src/modules/color/index.ts
index b18fae65..651716f0 100644
--- a/src/modules/color/index.ts
+++ b/src/modules/color/index.ts
@@ -246,7 +246,7 @@ export class ColorModule {
* @param options.includeAlpha Adds an alpha value to the color (RGBA). Defaults to `false`.
*
* @example
- * faker.color.rgb() // '#8be4ab'
+ * faker.color.rgb() // '#0d7f26'
* faker.color.rgb({ prefix: '0x' }) // '0x9ddc8b'
* faker.color.rgb({ casing: 'upper' }) // '#B8A51E'
* faker.color.rgb({ casing: 'lower' }) // '#b12f8b'
@@ -254,6 +254,8 @@ export class ColorModule {
* faker.color.rgb({ format: 'hex', casing: 'lower' }) // '#bb9d17'
* faker.color.rgb({ format: 'css' }) // 'rgb(216, 17, 192)'
* faker.color.rgb({ format: 'binary' }) // '00110010 00001000 01110110'
+ * faker.color.rgb({ includeAlpha: true }) // '#f96efb5e'
+ * faker.color.rgb({ format: 'css', includeAlpha: true }) // 'rgba(180, 158, 24, 0.75)'
*
* @since 7.0.0
*/
@@ -330,6 +332,8 @@ export class ColorModule {
* faker.color.rgb({ format: 'decimal' }) // [64, 192,174]
* faker.color.rgb({ format: 'css' }) // 'rgb(216, 17, 192)'
* faker.color.rgb({ format: 'binary' }) // '00110010 00001000 01110110'
+ * faker.color.rgb({ includeAlpha: true }) // '#f96efb5e'
+ * faker.color.rgb({ format: 'css', includeAlpha: true }) // 'rgba(180, 158, 24, 0.75)'
* faker.color.rgb({ format: 'decimal', includeAlpha: true }) // [52, 250, 209, 0.21]
*
* @since 7.0.0