Skip to content

Instantly share code, notes, and snippets.

@shawnfromportland
Created October 8, 2018 05:53
Show Gist options
  • Save shawnfromportland/43d522c4c5aad6ec37d4b15f92bcb45f to your computer and use it in GitHub Desktop.
Save shawnfromportland/43d522c4c5aad6ec37d4b15f92bcb45f to your computer and use it in GitHub Desktop.
<?php
// ============================================================================
// Config section
// Set up whatever values you want for the circadian animation
// ============================================================================
// Time zone used to do day/night calculations
$targetTimezone = 'America/Los_Angeles';
// Coordinates used to retrieve circadian cycle information (Lat, Long)
$targetCoordinates = [44.5, -123.2];
// Background colors to use at corresponding points of the day/night cycle
// any valid css color string will work here, hex or rgba.
$bgColors =
[
'astronomical_twilight_begin' => 'rgba(39, 50, 79, 1)',
'nautical_twilight_begin' => 'rgba(58, 79, 110, 1)',
'civil_twilight_begin' =>'rgba(246, 156, 238, 1)',
'civil_twilight_begin' => 'rgba(246, 156, 238, 1)',
'sunrise' =>'rgba(248, 235, 181, 1)',
'transit' => 'rgba(32, 36, 10, 1)',
'sunset' => 'rgba(255, 202, 123, 1)',
'civil_twilight_end' => 'rgba(56, 93, 148, 1)',
'nautical_twilight_end' => 'rgba(36, 67, 94, 1)',
'astronomical_twilight_end' => 'rgba(5, 18, 50, 1)'
];
// Text colors to use at corresponding points of the day/night cycle
// any valid css color string will work here, hex or rgba.
$textColors =
[
'astronomical_twilight_begin' => '#f7ca83',
'nautical_twilight_begin' => '#f7ca83',
'civil_twilight_begin' => '#946ed2',
'sunrise' => '#e28336',
'transit' => '#c0ae68',
'sunset' => '#dd3805',
'civil_twilight_end' => '#f9e287',
'nautical_twilight_end' => '#f7c283',
'astronomical_twilight_end' => '#f7ca83'
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment