To create a custom theme on Drupal 8, follow the steps below:
1. Create a new folder in the “themes” directory of your Drupal installation. Give it a unique name that describes your theme.
1. Create a new file in your theme folder called “mytheme.info.yml”. This file contains metadata about your theme, such as its name, description, version, and dependencies. Here is an example:
```
name: My Theme
description: A custom theme for Drupal 8
version: 1.0
type: theme
core: 8.x
base theme: stable
```
1. Create a new folder called “templates” inside your theme folder. This folder will contain all the twig templates used by your theme.
1. Customize the twig templates to create the desired look and feel of your site. Twig templates are used to generate HTML output based on the data provided by Drupal. By default, Drupal provides many template files that you can override in your theme.
1. Create a CSS folder inside your theme folder, and add custom styles for your theme.
1. Enable your theme by going to the Appearance menu in Drupal and selecting your theme.
1. Fine-tune your theme settings in the Appearance menu or by using the “theme settings” button on the enabled theme page.
That’s it! Your custom theme is now up and running in Drupal 8. You can continue to refine your theme by editing the templates and CSS files as needed.