@@ -231,7 +231,7 @@ export class ColorModule {
231
231
* Returns an RGB color.
232
232
*
233
233
* @example
234
- * faker.color.rgb() // '0xffffFF '
234
+ * faker.color.rgb() // '#8be4ab '
235
235
*
236
236
* @since 7.0.0
237
237
*/
@@ -240,34 +240,34 @@ export class ColorModule {
240
240
* Returns an RGB color.
241
241
*
242
242
* @param options Options object.
243
- * @param options.prefix Prefix of the generated hex color. Only applied when 'hex' format is used. Defaults to `'0x '`.
244
- * @param options.casing Letter type case of the generated hex color. Only applied when `'hex'` format is used. Defaults to `'mixed '`.
243
+ * @param options.prefix Prefix of the generated hex color. Only applied when 'hex' format is used. Defaults to `'# '`.
244
+ * @param options.casing Letter type case of the generated hex color. Only applied when `'hex'` format is used. Defaults to `'lower '`.
245
245
* @param options.format Format of generated RGB color. Defaults to `hex`.
246
246
* @param options.includeAlpha Adds an alpha value to the color (RGBA). Defaults to `false`.
247
247
*
248
248
* @example
249
- * faker.color.rgb() // '0xffffFF '
250
- * faker.color.rgb({ prefix: '# ' }) // '#ffffFF '
251
- * faker.color.rgb({ casing: 'upper' }) // '0xFFFFFF '
252
- * faker.color.rgb({ casing: 'lower' }) // '0xffffff '
253
- * faker.color.rgb({ prefix: '#', casing: 'lower' }) // '#ffffff '
254
- * faker.color.rgb({ format: 'hex', casing: 'lower' }) // '#ffffff '
255
- * faker.color.rgb({ format: 'css' }) // 'rgb(255, 0, 0 )'
256
- * faker.color.rgb({ format: 'binary' }) // '10000000 00000000 11111111 '
249
+ * faker.color.rgb() // '#8be4ab '
250
+ * faker.color.rgb({ prefix: '0x ' }) // '0x9ddc8b '
251
+ * faker.color.rgb({ casing: 'upper' }) // '#B8A51E '
252
+ * faker.color.rgb({ casing: 'lower' }) // '#b12f8b '
253
+ * faker.color.rgb({ prefix: '#', casing: 'lower' }) // '#eb0c16 '
254
+ * faker.color.rgb({ format: 'hex', casing: 'lower' }) // '#bb9d17 '
255
+ * faker.color.rgb({ format: 'css' }) // 'rgb(216, 17, 192 )'
256
+ * faker.color.rgb({ format: 'binary' }) // '00110010 00001000 01110110 '
257
257
*
258
258
* @since 7.0.0
259
259
*/
260
260
rgb ( options ?: {
261
261
/**
262
262
* Prefix of the generated hex color. Only applied when 'hex' format is used.
263
263
*
264
- * @default '0x '
264
+ * @default '# '
265
265
*/
266
266
prefix ?: string ;
267
267
/**
268
268
* Letter type case of the generated hex color. Only applied when `'hex'` format is used.
269
269
*
270
- * @default 'mixed '
270
+ * @default 'lower '
271
271
*/
272
272
casing ?: Casing ;
273
273
/**
@@ -291,9 +291,9 @@ export class ColorModule {
291
291
* @param options.includeAlpha Adds an alpha value to the color (RGBA). Defaults to `false`.
292
292
*
293
293
* @example
294
- * faker.color.rgb() // '0xffffFF '
295
- * faker.color.rgb({ format: 'decimal' }) // [255, 255, 255 ]
296
- * faker.color.rgb({ format: 'decimal', includeAlpha: true }) // [255, 255, 255 , 0.4 ]
294
+ * faker.color.rgb() // '0x8be4ab '
295
+ * faker.color.rgb({ format: 'decimal' }) // [64, 192,174 ]
296
+ * faker.color.rgb({ format: 'decimal', includeAlpha: true }) // [52, 250, 209 , 0.21 ]
297
297
*
298
298
* @since 7.0.0
299
299
*/
@@ -315,36 +315,36 @@ export class ColorModule {
315
315
* Returns an RGB color.
316
316
*
317
317
* @param options Options object.
318
- * @param options.prefix Prefix of the generated hex color. Only applied when `'hex'` format is used. Defaults to `'0x '`.
319
- * @param options.casing Letter type case of the generated hex color. Only applied when `'hex'` format is used. Defaults to `'mixed '`.
318
+ * @param options.prefix Prefix of the generated hex color. Only applied when `'hex'` format is used. Defaults to `'# '`.
319
+ * @param options.casing Letter type case of the generated hex color. Only applied when `'hex'` format is used. Defaults to `'lower '`.
320
320
* @param options.format Format of generated RGB color. Defaults to `'hex'`.
321
321
* @param options.includeAlpha Adds an alpha value to the color (RGBA). Defaults to `false`.
322
322
*
323
323
* @example
324
- * faker.color.rgb() // '0xffffFF '
325
- * faker.color.rgb({ prefix: '# ' }) // '#ffffFF '
326
- * faker.color.rgb({ casing: 'upper' }) // '0xFFFFFF '
327
- * faker.color.rgb({ casing: 'lower' }) // '0xffffff '
328
- * faker.color.rgb({ prefix: '#', casing: 'lower' }) // '#ffffff '
329
- * faker.color.rgb({ format: 'hex', casing: 'lower' }) // '#ffffff '
330
- * faker.color.rgb({ format: 'decimal' }) // [255, 255, 255 ]
331
- * faker.color.rgb({ format: 'css' }) // 'rgb(255, 0, 0 )'
332
- * faker.color.rgb({ format: 'binary' }) // '10000000 00000000 11111111 '
333
- * faker.color.rgb({ format: 'decimal', includeAlpha: true }) // [255, 255, 255 , 0.4 ]
324
+ * faker.color.rgb() // '#0d7f26 '
325
+ * faker.color.rgb({ prefix: '0x ' }) // '0x9ddc8b '
326
+ * faker.color.rgb({ casing: 'upper' }) // '#B8A51E '
327
+ * faker.color.rgb({ casing: 'lower' }) // '#b12f8b '
328
+ * faker.color.rgb({ prefix: '#', casing: 'lower' }) // '#eb0c16 '
329
+ * faker.color.rgb({ format: 'hex', casing: 'lower' }) // '#bb9d17 '
330
+ * faker.color.rgb({ format: 'decimal' }) // [64, 192,174 ]
331
+ * faker.color.rgb({ format: 'css' }) // 'rgb(216, 17, 192 )'
332
+ * faker.color.rgb({ format: 'binary' }) // '00110010 00001000 01110110 '
333
+ * faker.color.rgb({ format: 'decimal', includeAlpha: true }) // [52, 250, 209 , 0.21 ]
334
334
*
335
335
* @since 7.0.0
336
336
*/
337
337
rgb ( options ?: {
338
338
/**
339
339
* Prefix of the generated hex color. Only applied when `'hex'` format is used.
340
340
*
341
- * @default '0x '
341
+ * @default '# '
342
342
*/
343
343
prefix ?: string ;
344
344
/**
345
345
* Letter type case of the generated hex color. Only applied when `'hex'` format is used.
346
346
*
347
- * @default 'mixed '
347
+ * @default 'lower '
348
348
*/
349
349
casing ?: Casing ;
350
350
/**
0 commit comments